开发者

Redirect using .htaccess file. How?

开发者 https://www.devze.com 2022-12-22 15:07 出处:网络
I hav开发者_开发百科e a file as \"documentRoot/app/webroot/myFile.php\" I need to be able to access this file at \"mySite/myFile.xml\" ie when i type myFile.xml a call should goto \"documentRoot/app/

I hav开发者_开发百科e a file as "documentRoot/app/webroot/myFile.php"

I need to be able to access this file at "mySite/myFile.xml" ie when i type myFile.xml a call should goto "documentRoot/app/webroot/myFile.php"

How can i do this by using .htaccess file??


Options +FollowSymlinks
RewriteEngine on

RewriteRule ^(.+)\.xml$ documentRoot/app/webroot/$1.php [L]


Redirect 301 /mySite/myFile.xml http://example.com/documentRoot/app/webroot/myFile.php
0

精彩评论

暂无评论...
验证码 换一张
取 消