Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: domain specific rewrite Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
shawnaraxi
Newbie
Newbie


Joined: 26 January 2010
Online Status: Offline
Posts: 22
Posted: 28 January 2010 at 2:50pm | IP Logged Quote shawnaraxi

I have a basic rewrite that works fine:
RewriteRule ^/my-super-product\.html$ /index.cfm?action=home&container=59
there are about 300 of these links.

I need it now to be slightly different per domaine. If a domain is mycompany.co.uk then I can leave it as is. But if it is mycompany.fr I need to add a subfolder "english/" in front of the rewrite.

if domain is mycompany.co.uk the link should look like this:
mycompany.co.uk/my-super-product.html
and rewritten to this
mycompany.co.uk/index.cfm?action=home&container=59

if domain is mycompany.fr the link should look like this:
mycompany.fr/english/my-super-product.html
and also rewritten to this
mycompany.co.uk/index.cfm?action=home&container=59

 

Back to Top View shawnaraxi's Profile Search for other posts by shawnaraxi
 
shawnaraxi
Newbie
Newbie


Joined: 26 January 2010
Online Status: Offline
Posts: 22
Posted: 28 January 2010 at 2:51pm | IP Logged Quote shawnaraxi

I have 4 domains in total with 4 different conditions
Back to Top View shawnaraxi's Profile Search for other posts by shawnaraxi
 
shawnaraxi
Newbie
Newbie


Joined: 26 January 2010
Online Status: Offline
Posts: 22
Posted: 28 January 2010 at 4:39pm | IP Logged Quote shawnaraxi

no need for a solution here anymore.

 

I did a workaround in sql server. in case anyone else is interested here's the query. it was just a copy paste afterwords.

SELECT 'RewriteRule ^/' + COALESCE (SiteLevel + '/', '') + FriendlyPage + '\.html$' AS FriendlyPage,

'/index.cfm?action=' + COALESCE (NULLIF (PageURL, ''), 'home') + '&language=english' AS PageURL

FROM tblSiteMetaData

WHERE (NOT (FriendlyPage IS NULL))

UNION

SELECT 'RewriteRule ^/' + 'english/' + COALESCE (SiteLevel + '/', '') + FriendlyPage + '\.html$' AS FriendlyPage,

'/index.cfm?action=' + coalesce(nullif(PageURL,''), 'home') + '&language=english' AS PageURL

FROM tblSiteMetaData

WHERE (NOT (FriendlyPage IS NULL))

UNION

SELECT 'RewriteRule ^/' + 'francais/' + COALESCE (SiteLevelFrench + '/', '') + FriendlyPageFrench + '\.html$' AS FriendlyPage,

'/index.cfm?action=' + coalesce(nullif(PageURL,''), 'home') + '&language=french' AS PageURL

FROM tblSiteMetaData

WHERE (NOT (FriendlyPageFrench IS NULL))

UNION

SELECT 'RewriteRule ^/' + COALESCE (SiteLevelFrench + '/', '') + FriendlyPageFrench + '\.html$' AS FriendlyPage,

'/index.cfm?action=' + coalesce(nullif(PageURL,''), 'home') + '&language=french' AS PageURL

FROM tblSiteMetaData

WHERE (NOT (FriendlyPageFrench IS NULL))

Back to Top View shawnaraxi's Profile Search for other posts by shawnaraxi
 

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