Forums

Help me please to mod_rewrite htaccess for permalinks (8 posts)

  1. sherry_d
    Member
    Posted 1 year ago #

    I have read all the most of the tutorial but i still cant get how to mod_rewrite htaccess so my permalinks with this structure work properly /%category%/%postname%/

    Below is how my htaccess look. Can you please advise me on what it should look like to enable the rewright

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    The url of my site is http://wearewithyou.co.uk

    Many Thanks

  2. sherry_d
    Member
    Posted 1 year ago #

    anyone who can help me with this please. I am just stuck

  3. jleuze
    Member
    Posted 1 year ago #

    Your .htaccess looks right, as does your permalink structure.

    But I would start over and try again. If you don't have anything else in your .htaccess file, download it with your FTP client, open it up and delete the content. Re-upload it, check to make sure that the permissions are set to "777".

    Then go back into the "Permalinks" section of the WordPress Dashboard, and change to one of the default common settings, like "Day and name".

    Then save the changes to have WordPress write to your .htaccess file. If this works, then you can try editing the permalink structure.

    Are you on Linux webhosting?

  4. sherry_d
    Member
    Posted 1 year ago #

    I was using remove top level categories plugin and this was causing the error. I just deactivated it and everything began working properly but i now have "category" before each category.

    Hey problem solved finally

  5. itsfashionbaby
    Member
    Posted 4 months ago #

    sorry - old post.

  6. mitchellb16
    Member
    Posted 2 months ago #

    Hi, I am having a similar problem. I am trying to create a .htaccess file in my httpdocs directory for my site url http://bimach.com/main

    My htaccess file looks like this:

    # BEGIN WordPress

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /main/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /main/index.php [L]
    </IfModule>

    # END WordPress

    My htaccess file is set to 777. But when I try to change my permalinks I still get a dialogue saying that my htaccess is not writable and I have to put the code in.

    Any help appreciated.
    Thanks.

  7. mitchellb16
    Member
    Posted 2 months ago #

    Never, mind. Figured it out.

    I put the .htaccess file in the /main folder and took out all the code that specified accessing the /main directory. Works now.

  8. alchemist53
    Member
    Posted 2 months ago #

    Of course the other approach is to include your rewrite rules/config in the Apache httpd.conf (if you have access). See the example provided here: http://bytearray.brixtonjunkies.com/2009/08/19/wordpress-permalinks-apache-setup/

Topic Closed

This topic has been closed to new replies.

About this Topic