Solved

mod_rewite

Posted on 2006-11-28
4
241 Views
Last Modified: 2012-05-05
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
Comment
Question by:mnb93
  • 2
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
rhickmott earned 500 total points
ID: 18035377
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
 
LVL 5

Author Comment

by:mnb93
ID: 18041491
Sorry your method doesn't work.
0
 
LVL 5

Author Comment

by:mnb93
ID: 18041533
FIX:

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

RewriteCond %{REQUEST_URI} !^/b/.*$ [NC]
RewriteCond %{REQUEST_URI} !^/e/.*$ [NC]
0
 
LVL 13

Expert Comment

by:rhickmott
ID: 18041621
/'s are such a pain in Mod Rewrites :)

Glad you got it sorted
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question