0

I would like to have a short url like:

 https://myDomain/essr

to evaluate to:

 https://myDomain/dir1/dir2/myFile.html

I've been trying to use alias in my apache config but I haven't been able to make it work. How would you go about it?

If the file was a php file and I want it to execute what else needs to be done?

Bob Brunius
  • 101
  • 2
  • I think you want mod_rewrite but since I am lazy would use a [`RediredtMatch`](https://httpd.apache.org/docs/2.4/mod/mod_alias.html#redirectmatch) directive `RedirectMatch “/essr$” “/dir1/dir2/myFile.html”` – HBruijn Mar 09 '18 at 08:09
  • It does the redirect but it would be nice if the url in the browser stayed as https://myDomain/essr So would mod_rewrite do that? – Bob Brunius Mar 09 '18 at 16:48
  • Yes indeed mod_rewrite wouldn’t change the url in the browser – HBruijn Mar 09 '18 at 19:22

0 Answers0