This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
LinkFreeze
 Helicon Tech : LinkFreeze
Subject Topic: Exclude single file from rewrite Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
FairweatherWeb
Newbie
Newbie


Joined: 16 November 2008
Location: United Kingdom
Online Status: Offline
Posts: 22
Posted: 25 October 2011 at 5:49pm | IP Logged Quote FairweatherWeb

Chaps

I have a rewrite rule to catch all pages and redirect to a single handler file. I need to exclude a single file from the rule called admin.asp - any ideas?

My current rules are:

Code:
RewriteCond %{HTTP_HOST} ^(www.)?localemergencylocksmiths\.co.uk$ [NC]
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

# rewrite for the first and second level pages to index.asp
RewriteEngine on
RewriteBase /
RewriteRule ^$ /index.asp [NC,L]
RewriteRule ^[^/]+/?$ /index.asp [NC,L]
RewriteRule ^[^/]+/[^/]+/?$ /index.asp [NC,L]
RewriteRule ^[^/]+/[^/]+/[^/]+/?$ /index.asp [NC,L]

# proxy rule for sub1.domain.com
RewriteCond %{HTTP:Host} [^.]+\.localemergencylocksmiths\.co\.uk$ [NC]
RewriteRule .* http://www.localemergencylocksmiths.co.uk/index.asp [NC,P,L]



__________________
Regards
Kevin Russell
Fairweather Web LTD
Back to Top View FairweatherWeb's Profile Search for other posts by FairweatherWeb Visit FairweatherWeb's Homepage
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 26 October 2011 at 3:48am | IP Logged Quote Anton

Please add the following line at the top of your config:

RewriteCond %{REQUEST_URI} ^/admin\.asp [NC]
RewruteRule .? - [L]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum