mkelley
Nov 24 2002, 11:31 AM
I want to move my site to a php-based file system. Right now, all of my archive files are *.html and I want to change that to *.php without screwing up the linking on search engines and other sites.
Does anyone know how to redirect html to php with an htaccess file? If I try wildcards *.html or any other changes, I get a 500 error.
girlie
Nov 24 2002, 11:53 AM
Does something like this work?
CODE
RedirectMatch permanent ^(.*)\.html$ $1.php
mkelley
Nov 24 2002, 01:19 PM
Thanks! That works.
bmk
Nov 24 2002, 02:53 PM
You can run php in .html files by adding this to your htaccess:
AddType application/x-httpd-php .html .php
Then you don't have to change the extensions at all.
girlie
Nov 24 2002, 04:37 PM
Ya know, it's funny - that was the first thing I went looking for - the thread where you posted that. Then I thought, oh, that's not what he/she wants!
Duh to me!!
:0
mkelley
Dec 2 2002, 01:55 PM
I tried that first bmk and it doesn't work with my host. But thanks for all of the help.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.