Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • Last Modified:

mod_rewite

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ index.php [L]

I would like to exclude that rule from /x/*
and
/b/*

I have tried putting:
RewriteRule ^/b/(.*)$ /b/$1 [L]

above it but with no avail.
0
mnb93
Asked:
mnb93
  • 2
  • 2
1 Solution
 
rhickmottCommented:
You could try a system like this

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^b/.*$
RewriteCond %{REQUEST_URI} !^x/.*$
RewriteRule ^.*$ index.php [L]

take careful note of where you place /'s and where you dont!

RewriteRule ^.*$ index.php [L] for example if used within a sub folder will direct say http://www.domain.com/folder1/folder2/ to http://www.domain.com/folder1/index.php

Where as

RewriteRule ^.*$ /index.php [L] will direct the same url to to http://www.domain.com/index.php

0
 
mnb93Author Commented:
Sorry your method doesn't work.
0
 
mnb93Author Commented:
FIX:

RewriteCond %{REQUEST_URI} !^/b$ [NC]
RewriteCond %{REQUEST_URI} !^/e$ [NC]

RewriteCond %{REQUEST_URI} !^/b/.*$ [NC]
RewriteCond %{REQUEST_URI} !^/e/.*$ [NC]
0
 
rhickmottCommented:
/'s are such a pain in Mod Rewrites :)

Glad you got it sorted
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now