Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Created apache alias directory, but not working

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

  • www.example.com/aa

error Cannot find server appears.

However if I enter

  • www.example.com/aa/

it works.

Any Idea how to fix this issue?

like image 568
user1126720 Avatar asked Jan 04 '12 19:01

user1126720


1 Answers

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.

like image 57
Rajat Singhal Avatar answered Sep 28 '22 09:09

Rajat Singhal