How can I tell the web server to process .asp files as though they were .php files?
I know: any vbscript in them won't be executed.
It's for SEO reasons that I want to keep the .asp extensions.
Can my Apache server process php code in .asp files?
Moderator: General Moderators
-
intellivision
- Forum Commoner
- Posts: 83
- Joined: Mon Aug 22, 2005 1:25 am
- Location: Orbit
Code: Select all
AddType application/x-httpd-php .php .aspRe: Can my Apache server process php code in .asp files?
I would let your webserver reply with a 301 Moved Permanently for the asp pages and provide the new location.intellivision wrote:How can I tell the web server to process .asp files as though they were .php files?
I know: any vbscript in them won't be executed.
It's for SEO reasons that I want to keep the .asp extensions.
-
intellivision
- Forum Commoner
- Posts: 83
- Joined: Mon Aug 22, 2005 1:25 am
- Location: Orbit
I should have added it's a virtual server. I suppose I should ask tech support if I can modify the Apache config file (assuming feyd and ok, your solution was meant to be added to that file).
timvw, can your solution be implemented through .htacess?
In that file I have a
Thanks, you three.
timvw, can your solution be implemented through .htacess?
In that file I have a
but of course it's throwing a 302.Redirect /page.asp http://www.domain.com/page.html
Thanks, you three.
You mean something along the lines of the following?
Options +Indexes
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.asp$ http://example.com/$1.php[R=301,L]