Click to See Complete Forum and Search --> : [RESOLVED] mod_rewrite rule ordering


PineSolPirate
03-14-2007, 06:14 PM
I've not done much mod_rewrite, but I've got it working now, too well actually.

I wrote a rule to redirect everything in a domain through a portal page with arguments. It's pretty basic right now.

My problem is that now I can not get to any sub-folders, like admin, or phpmyadmin folders. I've tried the [L] flag and some rules before it, but it doesn't seem to work. Hopefully I'm just missing something obvious. Any ideas?

Thanks in advance, here's the .htaccess

RewriteEngine On
RewriteRule ^admin$ /admin/index.php [L]
RewriteRule ^phpmyadmin$ /phpmyadmin [L]
RewriteRule ^([a-zA-Z0-9/]+)$ /?page=$1

PineSolPirate
03-16-2007, 11:01 AM
Found my fix, though I'd share.
RewriteEngine On

RewriteCond %{REQUEST_URI} ^/admin/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/phpmyadmin/(.*)$
RewriteRule ^.*$ - [L]

RewriteRule ^([a-zA-Z0-9/]+)$ /?page=$1