Reply
http://www.site1.com + http://www.site2.com = same public_html folder?
Old 10-30-2009, 02:38 PM http://www.site1.com + http://www.site2.com = same public_html folder?
Junior Talker

Posts: 1
Name: Alan
Trades: 0
What's the best way to point two URLs to the same folder? If .htaccess, what's the best script?

Existing site is http://www.site1.com
New site is http://www.site2.com
The folder where index.html resides is public_html

When a user browses to site2, I want it to stay as site2 - not "resolve" to site1.

Make sense? Thanks in advance!
monstermovie is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 10-30-2009, 03:24 PM Re: http://www.site1.com + http://www.site2.com = same public_html folder?
chrishirst's Avatar
Super Moderator

Posts: 22,215
Location: Blackpool. UK
Trades: 0
parking
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-30-2009, 04:40 PM Re: http://www.site1.com + http://www.site2.com = same public_html folder?
webwest's Avatar
Experienced Talker

Posts: 35
Name: Dan Whims
Location: Los Angeles, CA
Trades: 0
Makes sense but if the files are the same for site1 and site2, Google will probably see it as duplicate content ... if that matters.
__________________
SEO Web Design | Custom MIVA Merchant Online Stores | Professional Business Web Hosting
One-stop Web Development Shop since 1995
webwest is offline
Reply With Quote
View Public Profile Visit webwest's homepage!
 
Old 10-30-2009, 07:44 PM Re: http://www.site1.com + http://www.site2.com = same public_html folder?
tripy's Avatar
Do not try this at home!

Posts: 3,176
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
As far as I know, you cannot affect that with an .htaccess file, bu in the virtualhost definition of Apache.

The command is serverAlias:
Code:
<VirtualHost *:80>
  serverName site1.com
  serverAlias www.site1.com site2.com www.site2.com
  documentRoot /var/www/site1/htdocs
</Virtualhost>
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is online now
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 10-30-2009, 11:03 PM Re: http://www.site1.com + http://www.site2.com = same public_html folder?
Super Talker

Posts: 128
Name: Jilesh
Trades: 0
You will have to parked the domain so that you can view the same content which is inside the public_html folder.
__________________
AccuWebHosting.Com - Windows Hosting Expert
ASP.NET 3.5 | SQL 2005 Database | US Based Hosting Company | 24 X 7 Support | Daily Backups
| Web Hosting Directory | Jobs Search Engine | Website Hosting
thewebhostingdi is offline
Reply With Quote
View Public Profile
 
Old 11-01-2009, 01:52 AM Re: http://www.site1.com + http://www.site2.com = same public_html folder?
cpace1983's Avatar
Average Talker

Latest Blog Post:
When Not to Outsource
Posts: 21
Name: Christopher Pace
Trades: 0
As others have mentioned, setup a virtual host with site1.com, and have site2.com as an alias to that domain.
__________________
I am a Linux server consultant.
I offer flat rate Linux support, as well as hourly support.
My wife is a Billings, Montana photographer
cpace1983 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to http://www.site1.com + http://www.site2.com = same public_html folder?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.11945 seconds with 13 queries