I’m using friendly URLs, and this rewriting works as expected:
# The Friendly URLs part<br />RewriteCond %{REQUEST_FILENAME} !-f<br />RewriteCond %{REQUEST_FILENAME} !-d<br />RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
For example
http://domain.com/about is rewritten as
http://domain.com/index.php?q=about
But for a specific page (with alias "book") I want to have a snippet that looks up book details from another database.
That is, I want to rewrite
http://domain.com/book/2153 to
http://domain.com/index.php?q=book&bookid=2153
To do this I’ve added another rewrite rule:
# The Friendly URLs part<br />RewriteCond %{REQUEST_FILENAME} !-f<br />RewriteCond %{REQUEST_FILENAME} !-d<br />RewriteRule ^book/([0-9]*)$ index.php?q=book&bookid=$1 [L,QSA]<br />RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
This seems to work correctly for all pages, and the snippet in "books" gets the bookid no problem.
BUT - no css stylesheet is being used for any page!
And if I type the css URL directly into the browser address bar
http://domain.com/assets/templates/default/site.css
it just shows the home page - not the stylesheet
If I remove the new rewrite rule, the css works fine.
Can anyone please suggest what might be going on?