Grow your CSS skills. Land your dream job.

Permalink Problems

  • # March 6, 2012 at 10:49 am

    Hi there,

    I’ve been working on a WordPress website recently and i’ve noticed something strange going on with the my peramlinks. For example the are currently displaying as, http://www.mysite.com/index.php/services what i need them to display as is http://www.mysite.com/services.

    I’ve got my settings set to, postname which gives me the example of, /index.php/%postname%/.

    When i try and change it in the custom structure box to just, /%postname%/ and then test my links all i get is directed to an error page.

    If anyone has any ideas how to fix this then it would be greatly appreciated.

    Many Thanks,

    Cameron

    # March 6, 2012 at 11:47 am

    I think this is something that needs to be fixed on server level. For example on Apache, it would need some .htaccess work and the mod_rewrite module.

    http://codex.wordpress.org/Using_Permalinks

    # March 6, 2012 at 12:44 pm

    Looks like you use an old server. I struggled a little while ago with this issue. Probebly you’re using a windows server with IIS runing on it and that kind of servers doesn’t support mod_rewrite functionality. Which is needed to use permalinks.

    Best option is to get a better server.

    # March 6, 2012 at 3:11 pm

    Not so fast! Before you go through the major struggle of getting a whole new server because @Vermaas suspects that it’s Windows IIS (which can handle rewrites)…… ;)

    Check if you actually do have IIS first. If yes, here’s just two random links where it’s explained how you can enable rewrites: http://blogs.iis.net/ruslany/archive/2009/05/16/iis-7-url-rewrite-module-support-in-wordpress-2-8.aspx and http://learn.iis.net/page.aspx/466/enabling-pretty-permalinks-in-wordpress/

    # March 6, 2012 at 3:18 pm

    Thanks for the link @senff i’ll have to look into that.

    @vermaas thanks for your comment. I believe its a linux server that the site is being hosted on, which i hear shouldn’t have these kind of issues?

    Did you find a work around for this or did you change to a better server? This site is for a client so it’s kind out of my hands when it comes to deciding where to host the site, the company claims to have thousands of WordPress sites under there service, so i wouldn’t have thought this would have been an issue for them.

    # March 6, 2012 at 3:26 pm

    @senff thank you so much for you help. It’s Linux, but they told me that it can be changed to Windows if need be. By the sounds of it Linux is the better option out of the two.

    I’ve tried writing a .htaccess file and uploading it but with no avail. So stumped with this.

    # March 6, 2012 at 3:34 pm

    @CameronDuthie Well first of all there were several things why i suggested my client to change server:
    1. The server panel was just like crap (his words)
    2. Client had his server rented at an other company (personal profit)
    3. He had no server access, so it was not possible to apply those rewrite rules. (problem)
    4. Personal taste of working with. (like linux more than windows)

    But if it’s, like you think, a linux server it might be an other problem. I don’t think you’ve changed any of the code of the .htaccess and the rewrite rules which are inside it?

    Have you tried to reinstall WordPress and the theme? And have you tried to upload the theme to an other server and sees what it does there?

    # March 6, 2012 at 3:53 pm

    @CameronDuthie — sorry, I would NOT recommend changing to Windows, sorry if you misunderstood me. I was merely trying to say that changing servers is not the best option in my opinion, your first resort should be just trying to fix the issue on the current server, whether it’s Linux or Windows or anything else.

    I wouldn’t change servers unless there are a BUNCH of problems (like @Vermaas just listed). Just having a problem with rewrite rules wouldn’t be enough for me to do that.

    My next answer would be to look into the .htaccess file indeed, but since you’ve already done that and it doesn’t seem that’s working either…..

    You could try to change the permalinks in your WordPress admin (settings -> permalinks). Change it to anything other than what you have right now, save settings, and change it back to what you want. It should automatically edit the .htaccess file for you, and if there’s something wrong, you should get an error. If you do, maybe it’ll give you a better insight in what’s wrong.

    # March 7, 2012 at 10:16 am

    @CameronDuthie: Tried to reinstall it?

    # March 7, 2012 at 11:30 am

    Thank you for your advice guys. @senff i’ve been on the phone to the server and they’ve told me that they don’t run apache so rewriting the .htaccess files won’t work with them. They run Zeus which requires a totally different kind of script.

    They’ve directed me here, http://www.names.co.uk/support/search_articles.php5?query=rewrite+files

    They permalinks was just one of the issues i was having so im going to take your advice and re-install WordPress all together in the hope that it will clear away the other issues as well.

    Thank you for your help @senff and @Vermaas!

    # March 7, 2012 at 1:56 pm

    Not sure reinstalling will resolve this
    Here’s a post about WordPress permalinks on Zeus

    http://www.netregistry.com.au/support/articles/wordpress-seo-friendly-permalinks

    # March 8, 2012 at 10:33 am

    @karlpcrowley Thanks for your comment and link. Your right, it didn’t resolve the issue. But when i made a rewrite.script file and placed this in it,

    #Zeus webserver version of basic WordPress mod_rewrite rules
    map path into SCRATCH:path from %{URL}
    look for file at %{SCRATCH:path}
    if exists then goto END
    look for dir at %{SCRATCH:path}
    if exists then goto END
    ##### FIX FOR LOGIN/FORGOTTEN PASSWORD/ADMIN ETC #####
    match URL into $ with ^/wp-.*$
    if matched then goto END
    set URL = /index.php

    it seemed to clear out any issues i was having before.

    Thanks again.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".