Forum Moderators: phranque

Message Too Old, No Replies

Separating vars whit /

         

Camaleon

8:13 pm on Dec 5, 2008 (gmt 0)

10+ Year Member



Hi, iam trying to separate some vars but i cant acomplished whit the / char.

Iam using this rule:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9]{1,2})/([^.]+)$ my_script.php?numericVar=$1&textVar=$2 [L]

It works whit _ or - , but if i use / i loose the css, images, etc files seeing only text because it is searching them on another directory i think.

So i used this:

RewriteCond %{REQUEST_URI} !^/(index\.php字obots\.txt存itemap\.xml奸abels\.rdf安3c/p3p\.xml)$
RewriteCond %{REQUEST_URI} !\.(gif夸pg夸peg?如ng夷co圭ss夸s地vi妃pe?g安av安mv妃p3存wf圩lv)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9]{1,2})/([^.]+)$ my_script.php?numericVar=$1&textVar=$2 [L]

But it didnt work.

How can i solve it ?

Thanks alot.

[edited by: Camaleon at 8:15 pm (utc) on Dec. 5, 2008]

g1smd

8:28 pm on Dec 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Your links to CSS and so on need to start with a / and state the full path to the file.

Camaleon

8:44 pm on Dec 5, 2008 (gmt 0)

10+ Year Member



Thanks, worked !

g1smd

9:21 pm on Dec 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yep. Always does.