开发者

Snow Leopard + mod_rewrite = 403 Forbidden

I am facing a very odd issue with Snow Leopard and Apache's mod_rewrite. I have set this up on Linux servers countless times, and it always worked. Being quite new t开发者_如何学Goo OS X, I'm quite puzzled.

This is my current configuration file as found in /etc/httpd/users/username.conf:

DocumentRoot "/Users/username/Sites/"

<Directory "/Users/username/Sites/">
    Options Indexes MultiViews +FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

Now my problem is that whenever I try to access a rewritten url I get a 403 Forbidden page. I have tried to see if there was any information in the log, but nothing is coming up, so I'm left here wondering. To be sure, my permissions seem to be fine (I have tried 755 and 775).

For reference, this is my .htaccess file:

RewriteEngine On
RewriteRule ^hello$ home.php [NC,L]
RewriteRule ^oops$ sorry.html [NC,L]

Just to make double sure I have set AllowOverride All in the main httpd.conf file (under Directory /).

Any advice is greatly welcome.

Thanks for your time :)

EDIT: I have just noticed that if I use a VirtualHost everything works as expected, so I wonder how my RewriteRules are being read by Apache...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜