permalinks is not working in xampp/localhost server on windows 7 permalinks is not working in xampp/localhost server on windows 7 wordpress wordpress

permalinks is not working in xampp/localhost server on windows 7


If your project is located on
E:/xampp/htdocs/ozi-tech/
then you need to specify the path starting from the localhost.

E:/xampp/htdocs/  === localhost === /

You just need to change RewriteBase and RewriteRule in the .htaccess:

# BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /ozi-tech/RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /ozi-tech/index.php [L]</IfModule># END WordPress


I did struggle to resolve this issue but the main thing i found is my local server which does not support htaccess URL rewrite scene so I uploaded the same code on ftp account and gets relief online.

I wonder if we could allow URL rewrite in local server though I have uncomment the URL rewrite module in xampp server but still unable to work in local environment.


Use .htaccess

 RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L]

The code above will get rid of the .php extension, thus giving you say index instead of index.php. And yes it works on localhost and nearly all hosting companies include it.