Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RewriteEngine on gives error 403

Tags:

Index file exists and works. When I create .htaccess file with the ONLY line:

RewriteEngine On 

Any page on server gives me:

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster. Error 403 mysite.com Wed Oct 5 22:25:25 2011 Apache/2.2.3 (Linux/SUSE)

Some server info:

Loaded Modules core prefork http_core mod_so mod_actions mod_alias mod_auth_basic mod_authn_file mod_authz_host mod_authz_groupfile mod_authz_default mod_authz_user mod_authn_dbm mod_autoindex mod_cgi mod_dir mod_env mod_expires mod_include mod_log_config mod_mime mod_negotiation mod_setenvif mod_ssl mod_suexec mod_userdir mod_rewrite mod_php5

Apache version:

SERVER_SOFTWARE Apache/2.2.3 (Linux/SUSE)

Also did this:

Options FollowSymLinks

In Directory section of httpd.conf

Log says just fact of error, not reasons:

89.112.xx.x - - [05/Oct/2011:22:32:34 +0200] "GET /info.php HTTP/1.1" 403 1040 "-" "Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
::1 - - [05/Oct/2011:22:32:45 +0200] "GET / HTTP/1.0" 200 1 "-" "Apache/2.2.3 (Linux/SUSE) (internal dummy connection)"

Thanks for any help!

like image 307
Dmitry Avatar asked Oct 05 '11 20:10

Dmitry


People also ask

What is a 403 redirect?

HTTP 403 is an HTTP status code meaning access to the requested resource is forbidden. The server understood the request, but will not fulfill it.

What does 403 forbidden on amino mean?

The 403 (Forbidden) status code indicates that the server understood the request but refuses to authorize it... If authentication credentials were provided in the request, the server considers them insufficient to grant access.


1 Answers

Place

Options +SymLinksIfOwnerMatch

as the first line of your .htaccess file. That fixed the problem for me.

like image 51
Kurt Avatar answered Sep 20 '22 07:09

Kurt