php - Stylesheets not loading after mod_rewrite -


i'm working on language function webpage using mod_rewrite. can enter url language option , extract information in php index file $_get. reason css files wont load more.

here .htaccess code:

rewriteengine on  rewritebase /books/  rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewritecond %{request_filename} !-l  rewriterule ^(se|en)/(.*)$ index.php?url=$2&language=$1 [qsa,l] rewriterule ^(.*)$ index.php?url=$1 [qsa,l] 

my stylesheets linked this:

     <link rel="stylesheet" type="text/css" href="localhost/books/css/style.css"> 

if try find css file in browser seems it's still rewriting though got rewritecond in place.

any suggestions why causing problems?

you can use:

rewriteengine on  rewritebase /books/  rewritecond %{request_filename} -d [or] rewritecond %{request_filename} -f [or] rewritecond %{request_filename} -l rewriterule ^ - [l]  rewriterule ^(se|en)/(.*)$ index.php?url=$2&language=$1 [qsa,l] rewriterule ^(.*)$ index.php?url=$1 [qsa,l] 

because rewritecond works first rewriterule after.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -