Solved

mod_rewite

Posted on 2006-11-28
4
243 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

752 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