Page 1 of 1

htaccess rewrite rule

Posted: Mon Oct 26, 2009 1:47 am
by rajsekar2u
Hi,

I want to rewrite the below url using htaccess file.

http://www.sitename.com/gallery.php

to

http://www.sitename.com/gallery.html

How to do this?

Re: htaccess rewrite rule

Posted: Mon Oct 26, 2009 2:50 am
by requinix

Code: Select all

AddType application/x-httpd-php .html
and rename the file to gallery.html.

Re: htaccess rewrite rule

Posted: Mon Oct 26, 2009 11:10 am
by markusn00b
Or, to answer the htaccess question:

Code: Select all

 
RewriteRule ^gallery.html$ gallery.php