0
votes

Well I have been having a tough time trying to figure out the reason for getting the forbidden error message on my wamp server.

I have a folder website_ink inside c:/wamp/www/ folder. when I access

http://localhost/website_ink/

the index page loads fine. But when i try to access any other page it gives me a forbidden error message.

The url i tried accessing was http://localhost/website_ink/cloud-plans.

This page does exist inside my root directory meaning inside website-ink/cloud-plans.php page does exist.

This is the error I find when visiting the url on browser

Forbidden

You don't have permission to access /website_ink/C:/wamp/www//website_ink/cloud-plans.php on this server.

Apache/2.4.9 (Win32) PHP/5.5.12 Server at localhost Port 80

This is the error message i found in the log file

The given path is misformatted or contained invalid characters: [client 127.0.0.1:60811] AH00127: Cannot map GET /website_ink/cloud-plans HTTP/1.1 to file.

I do not have any virtual hosts setup or anything fancy. Also I tried upgrading from Apache 2.2 to Apache 2.4. Currently I am using Apache 2.4.

Please help

1
Your scripts don't have the executable permissions set. Make sure they have permissions rwxr-xr-x set (755) so that they can be executed by the webserver. - Aaron D

1 Answers

0
votes

The reason why it happens is you try to open "/website_ink/cloud-plans" instead "/website_ink/cloud-plans.php".

In case you want to use path wiht out file extension you need add rewrite rule to .htaccess or httpd.conf:

RewriteEngine on
RewriteRule ^/(website_ink/.*)/$  /$1.php [L,QSA]

Also you need mod_rewrite to be installed and enabled