开发者

Perplexing .htaccess/PHP Conundrum

So... I finished a site on my local server, and I uploaded it to my remote server.

Going to the remote site yields an Internal Server error. I think there might be something wrong with the .htaccess file. Here's what it contains:

Options All -Indexes  
Options +FollowSymlinks  
DirectoryIndex launcher.php  
IndexIgnore */*  
RewriteEngine ON  
Rewrit开发者_高级运维eRule ^(.*)\.less$ $1.css.php [nc]  
RewriteRule ^([A-Za-z]+)$ launcher.php?page=$1 [QSA,L]

Eventually, I tried to debug the problem by adding # before the DirectoryIndex line to see what would happen. The result:

403 Forbidden

You don't have permission to access /site/ on this server.

Which is puzzling, because all the permissions seem to be ok... I double checked, the .htaccess file has octal 644.

What could be causing this issue? Thanks for any responses in advance.


Thanks to the help SO users, my problem was solved.

Apparently, Apache freaks out if the .htaccess file has permissions set to write, so I was able to fix the problem by chmoding the entire directory and everything in it to 755.


I had the same problem and as the error message says, the file mentioned was having permission 664. I just removed the write permission for group and the permission became 644. That fixed the error.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜