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
Message |

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


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:

RewriteCond %{HTTP_HOST} ^(www.)?localemergencylocksmiths\$ [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
RewriteCond %{HTTP:Host} [^.]+\.localemergencylocksmiths\.co\.uk$ [NC]
RewriteRule .* [NC,P,L]

Kevin Russell
Fairweather Web LTD
Back to Top Visit FairweatherWeb's Homepage
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]

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