Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

.htaccess question

Thread Tools
 
Search this Thread
 
Old 07 March 2006, 12:19 PM
  #1  
Rudi-Boy
Scooby Newbie
Thread Starter
 
Rudi-Boy's Avatar
 
Join Date: Jun 2004
Location: Manc
Posts: 17
Likes: 0
Received 0 Likes on 0 Posts
Question .htaccess question

I have two urls pointing to the same place. e.g. www.firsturl.co.uk and www.secondurl.co.uk both look at the same index.html.

How do get the www.secondurl.co.uk to look somewhere else for its index.html e.g. to www.thirdurl.co.uk or a directory ?
Old 07 March 2006, 03:56 PM
  #2  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Default

This isn't .htaccess, this is virtualhosting. To have a separate DocumentRoot/DirectoryIndex (I'm assuming you're using Apache since you mention .htaccess) then you'll need to set up both sites in their own virtual hosts.
Old 07 March 2006, 04:02 PM
  #3  
Rudi-Boy
Scooby Newbie
Thread Starter
 
Rudi-Boy's Avatar
 
Join Date: Jun 2004
Location: Manc
Posts: 17
Likes: 0
Received 0 Likes on 0 Posts
Default

Okay, how do I do that?
Old 07 March 2006, 04:23 PM
  #4  
Wurzel
Scooby Senior
iTrader: (1)
 
Wurzel's Avatar
 
Join Date: Nov 2000
Location: Wildberg, Germany/Reading, UK
Posts: 9,706
Likes: 0
Received 73 Likes on 54 Posts
Default

or I can send you a php script that will do it for you if you have no access to the web server config.
Old 07 March 2006, 06:00 PM
  #5  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Default

You need to know Apache and have access to the server config. Or, if you can
get a copy of the relevant parts of the config and supply the changes you need,
I can just paste it in here.
Old 08 March 2006, 06:40 AM
  #6  
Rudi-Boy
Scooby Newbie
Thread Starter
 
Rudi-Boy's Avatar
 
Join Date: Jun 2004
Location: Manc
Posts: 17
Likes: 0
Received 0 Likes on 0 Posts
Default

I don't have access to the server config. It's just two domains hosted by a domain hosting company, both of which point to the same directory on their server. I have ftp access.
Old 08 March 2006, 10:02 AM
  #7  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Default

You'll probably have to ask them to change your configuration. The PHP method will "work" but it's a horrible solution to a simple problem.
Old 08 March 2006, 02:39 PM
  #8  
Rudi-Boy
Scooby Newbie
Thread Starter
 
Rudi-Boy's Avatar
 
Join Date: Jun 2004
Location: Manc
Posts: 17
Likes: 0
Received 0 Likes on 0 Posts
Default

The problem is THEY won't change it unless I pay them a huge wodge of extra cash to use their webforwarding service. Ridiculous when you consider that most domain registration companies do it for next to nothing.
Old 08 March 2006, 03:27 PM
  #9  
Rudi-Boy
Scooby Newbie
Thread Starter
 
Rudi-Boy's Avatar
 
Join Date: Jun 2004
Location: Manc
Posts: 17
Likes: 0
Received 0 Likes on 0 Posts
Thumbs up

The PHP method worked.

Thank you everyone for all your help, and especially Wurzel for all the offline help.
Old 08 March 2006, 03:52 PM
  #10  
Wurzel
Scooby Senior
iTrader: (1)
 
Wurzel's Avatar
 
Join Date: Nov 2000
Location: Wildberg, Germany/Reading, UK
Posts: 9,706
Likes: 0
Received 73 Likes on 54 Posts
Cool

Originally Posted by Rudi-Boy
The PHP method worked.

Thank you everyone for all your help, and especially Wurzel for all the offline help.
Thats ok M8 the bills in the post
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
slimwiltaz
General Technical
20
09 October 2015 07:40 PM
IanG1983
Wheels, Tyres & Brakes
2
06 October 2015 03:08 PM
Brzoza
Engine Management and ECU Remapping
1
02 October 2015 05:26 PM
the shreksta
Other Marques
26
01 October 2015 02:30 PM



Quick Reply: .htaccess question



All times are GMT +1. The time now is 09:41 PM.