htaccess not working as it should

Posted by hsn on Stack Overflow See other posts from Stack Overflow or by hsn
Published on 2010-02-10T11:19:16Z Indexed on 2010/05/27 21:01 UTC
Read the original article Hit count: 188

Filed under:
|
|

well, ofcourse its not working, im still a n00b :)

this is the code that i have :

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)\.css - [S=7]
RewriteRule (.*)\.jpg - [S=6]
RewriteRule ^gallery gallery.html [L]

RewriteRule (.*)/(.*)/ index.html?page=$2 [L]
RewriteRule (.*)/(.*) index.html?page=$2 [L]
RewriteRule (.*)/ index.html?page=$1 [L]
RewriteRule (.*) index.html?page=$1 [L,QSA]

Now, this works fine, if i try localhost/abc but it wont work if i try localhost/abc/

also, when i try localhost/abc/def (or localhost/abc/def/ for that matter) the css file isnt being included properly. i get an error saying /abc/def/style.css does not exist. :(

however, the code doesnt work if i remove the QSA flag from the last rule. this is the code that ive come up with after a lot of googling and reading SO. if anyone can help out i'll be extremely grateful.

thanks!

© Stack Overflow or respective owner

Related posts about apache

Related posts about .htaccess