• Resolved shog

    (@shog)


    Hi guys. My problem is really simple, but I don’t know how to fix it. I want to use permalinks /%postname% on my site, but it doesn’t work. Permalinks are working correctly when did in form like: /index.php/%postname%. All of us know that links with index.php are quite annoying and I want to get rid of this, but I don’t know how. I’ve modified my .htaccess file with rewrite (my server has mod_rewrite enabled) with no effect. What’s more, my .htaccess file doesn’t work at all – not only with commands connected with rewrite, but even with eg DirectoryIndex. I tried to do something with custom 404, but with this I’m getting redirected to index when trying to enter any article/category. I’m out of ideas, do you have any clues how can I deal with this problem? Thanks for any replies.

Viewing 10 replies - 16 through 25 (of 25 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    What’s more, my .htaccess file doesn’t work at all – not only with commands connected with rewrite, but even with eg DirectoryIndex. I tried to do something with custom 404, but with this I’m getting redirected to index when trying to enter any article/category.

    Going back to that … NOTHING in .htaccess works? That goes back to the host, not you, doing something wrong.

    Are you on Yahoo servers perchance? I know they did something daft where you HAVE to use index.php.

    Good thinking, but Yahoo doesn’t even allow .htacess files, yet this host says, “that .htaccess files (including mod_rewrite) on the all of their servers are working properly and it must be wordpress’ fault.” ??

    I used a host-checking tool and it looks like something called LeaseWeb.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Except clearly not, and the functionality of .htaccess for NON WordPress things, like a custom 404, cannot be affected by WP, unless you’re using a plugin for redirects.

    Turn off all your plugins.

    Put this, and ONLY this, in your .htaccess:

    Redirect 301 /googletest https://google.com

    Go to https://www.czasfutbolu.pl/googletest

    If it borks, it ain’t WordPress, it’s your server. Get a stick and hit your host.

    Thread Starter shog

    (@shog)

    I’m not sure why your site would be using those instead of mod_rewrite if you say your server has mod_rewrite enabled. What is your custom permalink set to in Settings?

    I set permalink template to ‘/index.php/%postname%’. It’s the only permalink type working.

    In the meantime, could you perhaps double-check this in your phpinfo() file?

    Yes, I’m sure mod_rewrite is enabled. What’s more, my hosting provider writes this constantly in every message.

    Going back to that … NOTHING in .htaccess works? That goes back to the host, not you, doing something wrong. Are you on Yahoo servers perchance? I know they did something daft where you HAVE to use index.php.

    Unfortunately NOTHING works, really. :/ My hosting is located in Poland, it’s webd.pl.

    If it borks, it ain’t WordPress, it’s your server. Get a stick and hit your host.

    404 error.

    edit: By the way, I’ve noticed something interesting and I think it could be the answer for all weird things we got here. All files are located in: [main]/czasfutbolu.pl/public_html – there I have only wordpress and this htaccess file. But in my main folder I have public_html folder also (path: [main]/public_html/) and everything I have there is adequate to address: https://www.maciejro.webd.pl (this is my ‘parent’ address, without a domain). When I put a .htaccess file there, it works. It doesn’t work only in path mentioned above. I would copy all files just to /public_html/, but in this situation I don’t have my domain corresponding to this.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    That sounds like czasfutbolu.pl is an add-on domain? Is that right?

    Thread Starter shog

    (@shog)

    Yes, it is. I couldn’t notice that before, because my friend was doing all things connected with domains/users/redirecting etc.

    Thread Starter shog

    (@shog)

    Omg, finally got it working. ?? It was because of this subdomain. Thanks for all the posts here.

    Awesome! What did you do to get it working? You never know, it might help someone else in the future. ??

    Thread Starter shog

    (@shog)

    It was really simple thing. :p Just noticed that there was a subdomain maciejro.maciejro.webd.pl and domain czasfutbolu.pl was connected to this address. When I removed this unnecessary subdomain and moved all the files just to /public_html folder and redirected domain to main folder – everything started to work as it should. Conclusion is simple – on https://www.webd.pl hosting .htaccess files are working properly only in /public_html folder.

    Excellent – thanks for letting us know the resolution, glad it was an easy fix in the end.

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘An issue with permalinks / htaccess’ is closed to new replies.