Question

I would like to make e.g. www.address.com/u.exe equal to www.address.com/serverfile.php or pl?

Is it possible? So if someone types www.address.com/u.exe should get servefile.php...

Thanks for showing the right direction..

This seems to work. RewriteEngine on also had to be added.

I had to change .htaccess file

RewriteEngine on
RewriteRule ^u\.exe$ serverfile.php
Was it helpful?

Solution

Yes, it's possible with mod_rewrite like below.

RewriteRule ^/u.exe$ /serverfile.php [L]

Or below if you want to display serverfile.php (via a redirect).

RewriteRule ^/u.exe$ /serverfile.php [RL]

OTHER TIPS

Yes. That's what the mod_alias Apache module does for you: http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top