This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
LinkFreeze (Forum Locked Forum Locked)
 Helicon Tech : LinkFreeze
Subject Topic: Exclude single file from rewrite
Author
Message |
FairweatherWeb
Newbie


Joined: 16 November 2008
Location: United Kingdom
Posts: 22
Posted: 25 October 2011 at 5:49pm

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 Visit FairweatherWeb's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 26 October 2011 at 3:48am

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

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

__________________
Regards,
Anton
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
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