User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Linux Servers and Apache section within the Tech Talk category of DaniWeb, a massive community of 397,851 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,332 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Linux Servers and Apache advertiser:
Views: 758 | Replies: 0
Reply
Join Date: Oct 2006
Posts: 10
Reputation: fishhaddock1 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
fishhaddock1 fishhaddock1 is offline Offline
Newbie Poster

mod_rewrite question: regex help needed

  #1  
Aug 27th, 2007
Hello... I am trying to use mod_rewrite to send all traffic that isn't going to the directory /catalog to the /test directory

I tried a combination of ReWriteCond and Rewriterule:-
rewriteCond %{REQUEST_URI} !(^\/catalog.*) [NC]
rewriteRule (.*) /test/$1 [R]

This is working inconsistently, however....

/catalog gets rewritten, although I want it not too..
/catalog/ is OK, as planned
/catalog/config gets rewritten although I want it not too

Any ideas on what I can do here?? Basically, redirecting all requests that are NOT for the shopping cart, /catalog to /test, but its not working consistently..

thanks in advance for your help

fishflakes
Last edited by fishhaddock1 : Aug 27th, 2007 at 5:18 pm. Reason: fixed regex
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Linux Servers and Apache Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Linux Servers and Apache Forum

All times are GMT -4. The time now is 8:13 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC