Page 1 of 1

rewrite probmem

Posted: Tue Jan 29, 2008 2:16 pm
by hackerman
Hello.

I've problem with mod_rewrite. The code:

Code: Select all

 
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ?do=$1 [QSA,L]
 
It works, but there is a little bug. If I type, for example, "mypage.com/aaa/bbbbb/cc/", there disappear CSS. But if I type there only one value "mypage.com/aaa", then all is right. What I have to do to fix that bug?

Re: rewrite probmem

Posted: Tue Jan 29, 2008 3:26 pm
by JAM
Not to familiar withth eactual syntax, sorry. Some thoughts tho...
Cant you exclude css-hits with !\.css$ or something similiar? Differences with REQUEST_URI instead of REQUEST_FILENAME?

Re: rewrite probmem

Posted: Tue Feb 05, 2008 2:15 pm
by hackerman
Now I have a new problem with mod_rewrite. The code

Code: Select all

 
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/(.*)$ ?do=$1&id=$2 [QSA,L]

Code: Select all

This is if I want link, which have ID, for example, news.php?id=5 (news/5), but if I need just simple news.php (news/), then that script doesn't work.