Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem on OpenSuSE 11.04. I configured apache and enabled mod_rewrite but it doesn't working. on every php file I get 403 forbidden error.

share|improve this question

Have you updated your /etc/apache2/httpd.conf file? If not, open it and add the following lines at the end of the file. You may need to replace /srv/www/htdocs with the path to your server's 'htdocs' or 'public_html' directory:

DocumentRoot "/srv/www/htdocs"
<Directory "/srv/www/htdocs">
    Options +FollowSymLinks
    AllowOverride all
    Order deny,allow
    Allow from all

Restart Apache and check your URL again. If you still see errors, try creating an .htaccess file in your htdocs folder to force the base directory. This seems to help sometimes if your hosting company puts their VPS boxes behind another server:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

If this still fails to fix things for you, check the logs at /var/log/apache2/access_log and /var/log/apache2/error_log to see what's going wrong. You can also use RewriteLogLevel to get more information about where the URL rewrite fails.

share|improve this answer
Man i was since yesterday trying to understand why my mode-rewrite was not working... and i tried your solution to put this piece of code in my httpd.conf: DocumentRoot "/srv/www/htdocs" <Directory "/srv/www/htdocs"> Options +FollowSymLinks AllowOverride all Order deny,allow Allow from all </Directory> And my Codeigniter started to work like a charm... thanks for the tip!! – user18316 Sep 10 '12 at 18:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.