Lee Austin
Lee Austin

Reputation: 63

Localhost htaccess is not working

I am using .htaccess file on my localhost and write this code:

RewriteEngine On    # Turn on the rewriting engine

RewriteRule    ^about/?$    about.php    [NC,L]

I have checked http.doc file everthing is fine. But its not working fine.

Thanks.

Upvotes: 0

Views: 497

Answers (1)

Prix
Prix

Reputation: 19528

You can put the .htaccess on the www folder and place the content on it:

Options +FollowSymLinks -MultiViews

RewriteEngine On

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+(.*)\.php [NC]
RewriteRule ^ /%1.html? [R=302,L]

RewriteRule ^abc/about\.html/?$ /abc/about.php [NC,L]

Upvotes: 1

Related Questions