tags:

views:

43

answers:

2

I have 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??

+1  A: 
Redirect 301 /mySite/myFile.xml http://example.com/documentRoot/app/webroot/myFile.php
David Dorward
+2  A: 
Options +FollowSymlinks
RewriteEngine on

RewriteRule ^(.+)\.xml$ documentRoot/app/webroot/$1.php [L]
Ervin
is `Options +FollowSymlinks` necessary?
Josh