Is Cross-Domain URL Rewriting Possible?

Discussion in 'Apache' started by T0PS3O, Jan 8, 2007.

  1. #1
    Dilemma:

    osCommerce uses ?language=de etc. to change the language on the shop.

    As per Google's often repeated recommendations, I'd like to have myshop.de instead of myshop.com?language=de or the simple rewrite of myshop.co.uk/de or de.myshop.co.uk so I stand a far better chance of ranking in that lingo.

    I could install the shop for each language but that's a maintenance PITA.

    So... Here's my wild idea of the day: Can I rewrite the ?language=de to myshop.de and preserve the rest of the URL/Session whilst utilizing just one installation/database/fileset?

    Would it trick Browsers or choke browsers if the rewrite makes .de instead of say /de?

    I'm very interested in hearing your input (Nintendo!).
     
    T0PS3O, Jan 8, 2007 IP
  2. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If they aren't hosted on the same server, I'm not sure if it's possible. Otherwise I think you can have:
    RewriteRule (.*) /home/user/domains/myshop.com/$1?language=de&%{QUERY_STRING}
    Code (markup):
    Then it just depends on osCommerce - if it specifies which domain to set cookies on (i.e. the one you installed it on), you may have to edit it. Otherwise by default they are set for the domain they came from so that shouldn't be a problem.

    Your best option would be to try it and see what happens.
     
    rodney88, Jan 8, 2007 IP