Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help w/ htaccess

Status
Not open for further replies.

mopacfan

Programmer
Oct 30, 2000
190
US
I am converting a site from asp to php. I don't want to lose the indexing in the SE's and I would like to use the htaccess file to create a 301 redirect from "xyz.asp" to "xyz.php". But I have no idea how to do so.
 
nah.... why not just tell apache to send asp files through the php api? that's the easiest way of maintaining the same structure.

 
jpadie,
Exactly how would I do this? The new files are .php, no longer .asp.
 
change them back to an asp suffix.
then modify your httpd.conf file to parse those file endings with php.
 
Very cool. I'll look into that to find out if I can do so. The hosting on hostgator so I don't know if I have access to the httpd.conf file. If I do, that would be fantastic.
 
you can use an htaccess too.
same declaration. just add this line. you will probably need an htaccess file for each directory in which you place php files.

Code:
AddType application/x-httpd-php .asp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top