Page 1 of 1

mod_rewrite regex

Posted: Wed Jun 13, 2007 4:15 pm
by superdezign
I can get this to work:

Code: Select all

RewriteCond %{REQUEST_URI} ^.*/?$
But it's too greedy. I want to have different pages for fake folders so like folder1/ would produce a different rewrite than folder1/folder2/. And strangely... This doesn't seem to work at all.

Code: Select all

RewriteCond %{REQUEST_URI} ^[^/]/?$
Ideally, the second regex would only give me requests that consisted of one folder... But it just send me to an inexistant page.

Suggestions?

Posted: Wed Jun 13, 2007 6:54 pm
by ReDucTor
The REQUEST_URI starts with a / so its going to detect it straight up.

I'm not too certain on what your trying to produce..can you also post your RewriteRule

Posted: Wed Jun 13, 2007 6:58 pm
by superdezign
Ehh, it's okay. I was trying to avoid the $_GET variables ever being set, but I decided to settle for leaving them empty.