This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Generic Subdomain Redirect
Author
Message |
FairweatherWeb
Newbie


Joined: 16 November 2008
Location: United Kingdom
Posts: 22
Posted: 06 October 2011 at 8:22am

Andrew

I cannot get at the logs (reseller account) unless you mean the server logs

Code:
2011-09-02 11:47:00 W3SVC5991 OSCAR 89.238.179.3 GET /cm/images/back.jpg - 80 - 92.27.107.177 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+5.1;+Trident/4.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) __utma=105081630.570912858.1311850351.1311850351.1311866573.2;+__utmz=105081630.1311850351.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);+ASPSESSIONIDAARSDCTS=HHBPKHDANCDLBINGKCKIMEKG;+admin=ThisSessionDuration=21&http://www.localemergencylocksmiths.co.uk/admin.asp www.localemergencylocksmiths.co.uk 304 0 0 214 896 93


what do you mean two level URLS? I'd like teh rule to pick up everything.

Thanks again.
Kevin


Edited by FairweatherWeb - 06 October 2011 at 8:23am


__________________
Regards
Kevin Russell
Fairweather Web LTD
Back to Top Visit FairweatherWeb's Homepage
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 06 October 2011 at 8:41am

Well, you have this:

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


The RegExp [^/]+/[^/]+ will match /XXXXX/YYYY and won't match smth like /index.asp or /about_us/

So you need to use:

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


Joined: 16 November 2008
Location: United Kingdom
Posts: 22
Posted: 06 October 2011 at 9:20am

Thanks Andrew

For a generic subdomain rule would I use

Code:
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
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 07 October 2011 at 3:03am

I would say:

Code:
RewriteCond %{HTTP:Host} [^.]+\.localemergencylocksmiths\.co\.uk$ [NC]
RewriteRule .* http://www.localemergencylocksmiths.co.uk/index.asp [NC,P,L]


Regards
Andrew
Back to Top
 

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

<< Prev Page of 2
 
Printable version Printable version