rembrandt New member Jun 26, 2006 272 1 0 Australia Jul 8, 2006 #1 I'm pretty new to the whole .htaccess file so I was wondering how would I write the code if I just wanted to change files from www.mydomain.com/filename.php to www.mydomain.com/filename.html
I'm pretty new to the whole .htaccess file so I was wondering how would I write the code if I just wanted to change files from www.mydomain.com/filename.php to www.mydomain.com/filename.html
J-Tag They call him Danger Man! Jun 25, 2006 391 2 0 Cananada Jul 8, 2006 #2 Why is it that you want to do this? There is no benefit do doing so that I can imagine. That said: Code: RedirectMatch 301 (.*)\.php$ http://www.example.com$1.html to have it 301 from .php to html or Code: [/FONT]RemoveHandler .html .htm[FONT=monospace] [/FONT]AddType application/x-httpd-php .php .htm .html to have it parse .htm and .html files as PHP
Why is it that you want to do this? There is no benefit do doing so that I can imagine. That said: Code: RedirectMatch 301 (.*)\.php$ http://www.example.com$1.html to have it 301 from .php to html or Code: [/FONT]RemoveHandler .html .htm[FONT=monospace] [/FONT]AddType application/x-httpd-php .php .htm .html to have it parse .htm and .html files as PHP
rembrandt New member Jun 26, 2006 272 1 0 Australia Jul 8, 2006 #3 The reason I'm asking is because if a site has been done as a static site and then needs to be dynamic using php, and some of the pages are already indexed for SEO, the SERP's links won't be broken.
The reason I'm asking is because if a site has been done as a static site and then needs to be dynamic using php, and some of the pages are already indexed for SEO, the SERP's links won't be broken.
blindpete New member Jun 29, 2006 50 0 0 Fairfax VA USA www.rolldamage.com Jul 9, 2006 #4 I would use J-Tag's option 2. I did the same thing some years ago... the client had good links all over and didn't want to loose them.
I would use J-Tag's option 2. I did the same thing some years ago... the client had good links all over and didn't want to loose them.