2 Domain for 1 site Oscommerce

Using a single web hosting account to host multiple sites

2 Domain for 1 site Oscommerce

Postby leksa » Wed Mar 14, 2007 4:46 pm

Hi,.. i see good forum here to ask :)
I'm newbie in this domain handling with mod_rewrite. Usually use Cpanel. but we move to other host not support cpanel.
I have a site that running fine. But now we take other domain extension for this site.

Current site : www.domain.co.uk pointing to folder1
new domain : www.domain.com pointing to folder2

So, i have try rewrite with sample from my host support, but not what we expected.

we use this .httaces in folder2 that used by "new domain" :
Code: Select all
Options -Indexes

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.co.uk/index.php? [R=301,L]


The url keep showing www.domain.co.uk. We need the www.domain.com overwrite the url. Please if this possible for our Oscommerce with standard URL (not SEO_friendly URL mod, maybe we learn it first.. ;) )

Then another question, if its possible, does it affected to the payment gateway? Security or lost a connection between site and gateway (paypal etc)...

Thanks... Nice forum! :D found it in Google ;)[/code]
leksa
 
Posts: 1
Joined: Wed Mar 14, 2007 4:30 pm

Postby richardk » Fri Mar 16, 2007 1:20 pm

Do you want domain.com/abc to go to domain.co.uk/abc? If you do, you should first ask your host if they can make the domains go to the same directory.

Or you'll need mod_proxy and mod_rewrite. In a .htaccess file in /folder2
Code: Select all
Options -Indexes +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.co.uk/$1 [P,L]

(It you don't want domain.com/abc to go to domain.co.uk/abc, replace "$1" with "index.php?").
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 33 guests

cron