•
•
•
•
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
![]() |
•
•
Join Date: Oct 2006
Posts: 10
Reputation:
Rep Power: 2
Solved Threads: 0
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
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
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Linux Servers and Apache Marketplace
•
•
•
•
apple bbc cd cellphone choose code computer core debian dell desktop development drivers enterprise fedora fiji games gentoo gpl hardware ibm infrastructure install kernel laptop linux marketing microsoft mobile news novell open open source openoffice operating os palm preinstall red hat rhel security server source sun system ubuntu unix vista web windows
- mod_rewrite question. (Web Developers' Lounge)
- code tags (DaniWeb Community Feedback)
- Compile issues (Java)
- vBulletin mod_rewrite question? (Website Reviews)
- KFC monitor - speakers won't work (Peripherals)
- mod_rewrite question (Linux Servers and Apache)
- connect to text file database (Visual Basic 4 / 5 / 6)
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: Second Apache at different port
- Next Thread: Redirect URL request to another server


Linear Mode