Support » Fixing WordPress » .htaccess and permalinks: Error 404

  • Dear colleagues.- I do not see the permalinks with mod_rewrite. Before activating Options-Permalink and getting the bunch of code, i have made these steps. When i try to see the permalinks the 404 error appears: “The requested URL /wordpress/archives/category/zope/” was not found on this server. Tell me please where i am wrong.
    0. I have taken a look at WordPress FAQ “How do i turn on permalinks…”, and other stuff…
    1. I have pasted the generated code in Kate and saved it like simple text and with the name htaccess (not .htaccess).
    1.5. SSH connection with my server and in the console mode: “touch .htaccess”, after creating the empty file:
    2. I have uploaded it to my server with SFTP
    2.5. In the console mode: “mv htaccess .htaccess”
    3. In the console mode: “cat .htaccess” (everything OK)
    3. I have CHMODed it with the 766 code-number.
    3.5. In the wordpress directory: “ls -la .htaccess” and i see it CHMODed.
    4. I have done “cat .htaccess” again in the console and checked it. Everything OK. The only doubt: the path in RewriteBase and RewriteRules. I put “/wordpress/…” and after doing it “/home/www/wordpress/…”, using VI editor. Seeing the code with “cat” and seeing the two signs of breaking line (the second one is the letter M), the permalink does not work for me (not from my Ethernet, neither from Internet as i suppose).
    5. My URI is
    Possible errors made by me:
    0- Should i put the whole path in the RewriteBase and RewriteRules lines , i.e. something like the whole public IP?
    1. Should i delete the two signs for breaking lines with VI editor? When i save the code with Kate is just ASCII code?
    I know that there is a problem with the path (Error number: 404), but i do not guess where is it. Should i do something in Apache httpd.config or other file for switching off that file in favour of .htaccess?
    Thanking you in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi!
    I’m also new with WP and encounter 404 error after enabling permalinks.
    Have your resolved your issue?

    I had the same issue. In my case it was the configuration of the web server.
    In the <Directory> section of the folder the AllowOverride directive has to be set to All. Ex:
    <Directory “/var/www”>
    Options Indexes Includes FollowSymLinks
    AllowOverride All
    Allow from all
    Order allow,deny
    If, as in my case, it is set to None, Apache will ignore any .htaccess files completely.
    I don’t know how to accomplish this on other web servers, but I guess it’s something similar. If you have the site hosted somewhere else that might cause a problem though.
    Good Luck!

    maybe erase the trailing slash of the rewritebase url, it helps me get this working on my shared host.

    Tried that. Didn’t work. 🙁

    You likely have the wrong rewrite base path set

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘.htaccess and permalinks: Error 404’ is closed to new replies.