I have created an apache alias directory so that I can access the directory from outside the root folder with the same url...
The problem is that it refuse to work without a trailing slash. As an example if the site name is
error Cannot find server appears.
However if I enter
it works.
Any Idea how to fix this issue?
Why Wamp Server doesn’t do this automatically, I’m not sure, but at least there’s a simple fix.
Click on the Wamp Server icon again and select Apache -> Alias directories -> [alias url] -> Edit alias. This will open the alias file in Notepad. Remove the trailing slash from the relative URL.
For Example
Alias /example/ "c:/path/to/example/"
Would become
Alias /example "c:/path/to/example/"
Save the file and close Notepad.
Wamp Server should restart automatically (if not, do it manually). Once it has restarted, you’re alias should now work with or without the trailing slash.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With