.htaccess RewriteRule causing 403 Forbidden .htaccess RewriteRule causing 403 Forbidden apache apache

.htaccess RewriteRule causing 403 Forbidden


As it turns out, I needed to change the line:

Options FollowSymLinks

to:

Options +FollowSymLinks


Not familiar with that framework, but it looks like either there are some lines elsewhere or it may need tweaking.

Though I admittedly am no mod rewrite expert, looks like first line is directing all requests to request_file.html, then on line 2 if the file does not exist it calls up boostrap.php on line 3.

Your problem may lie in boostrap.php, see what happens in that script and how the request is handled. A debugger may be useful at that step. Although you may get this to work, it seems to me it may not be optimal as is. For instance, I believe usually there is a ruleset that avoid havings .gif, .jpg .css directed to your routing script. Something like this:

RewriteCond $1 !^(favicon\.ico|favicon\.png|media|robots\.txt|crossdomain\.xml|css|js)

This avoids the overhead of having php handle the requests for those types of files. There would even be more things to consider for robust application production usage, just tweak your rules so everything is routed proper and things should be fine.