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: Newbie: sh404sef double domain problem
Author
Message |
mustang
Newbie


Joined: 11 January 2006
Location: Netherlands
Posts: 3
Posted: 10 November 2011 at 8:20am

Im terrible in reg expressions, but currently sh404sef is adding double domain names in a url. im terrible in rewrite urls so i need your help.

The current urls:
http://www.domain.com/www.domain.com/View-all-products-in-shop.html
http://www.domain.com/www.domain.com/38-Algemene-beveiliging/Bekijk-alle-producten.html

ofcourse this should be forwarded to

http://www.domain.com/View-all-products-in-shop.html
http://www.domain.com/38-Algemene-beveiliging/Bekijk-alle-producten.html

so without the www.domain.com as folder. Thanks for the time and energy.



Edited by mustang - 10 November 2011 at 8:22am
Back to Top Visit mustang's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 10 November 2011 at 11:10am

Please put the following into the root of the site:

RewriteBase /
RewriteRule ^www\.domain\.com(/.*)$ $1 [NC,R=301,L]

__________________
Regards,
Anton
Back to Top
 
mustang
Newbie


Joined: 11 January 2006
Location: Netherlands
Posts: 3
Posted: 12 November 2011 at 7:07am

the problem is that the bug is not always there, so there sould be a if construction, if the "folder" is www.domain.com

like http://www.domain.com/www.domain.com then rewrite. In other cases the url is just fine.
Back to Top Visit mustang's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 14 November 2011 at 4:47am

Well, the above rule will only work if there's /www.domain.com in the URL. Otherwise the rule won't match and consequently won't fire.

__________________
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