Making pretty permalinks work in WAMP

I am not able to switch to pretty permalinks in WAMP. Changing to any form other than default gives 404 error.
I have switched on the rewrite_module in Apache. I Googled the problem and found that following changes should be made to httpd.conf file. My httpd.conf file stands as

<Directory />
    Options Indexes FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
</Directory>

I also checked that the .htaccess file is getting created. It reads as

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

# END WordPress

Related posts

Leave a Reply

3 comments

  1. All you need to do is turn on the mod_rewrite in the wamp settings tab.

    Click Wamp -> Apache -> Apache Modules -> rewrite_module

    If you select that then turn on %postname% it should work

  2. Did you reboot Apache after editing httpd.conf?

    A bulletproof check for mod_rewrite is to remove the <IfModule>...</IfModule> tags and try running WordPress – if you get a 500 Server Error, mod_rewrite isn’t installed.

    Also I would recommend changing <Directory /> to <Directory "C:/path/to/server/root"> (note the forward slashes too, even on Windows).

    And the deny order should be switched if you’re only on a development server;

    Order allow,deny
    Allow from all
    
  3. The problem may be:
    Whenever you have permalinks in subfolder of your main www folder (i.e.

    RewriteBase /subdirectory/
    

    you may need to have a .htaccess file in your main c:wampwww folder too.