GIDForums  

Go Back   GIDForums > Web Hosting Forums > Apache Web Server Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 17-Dec-2004, 17:27
DaveBrooke DaveBrooke is offline
New Member
 
Join Date: Dec 2004
Posts: 1
DaveBrooke is on a distinguished road

Clean domain redirect/rewrite with .htaccess


Greetings;

I'm trying to figure out the best way to accomplish the following via .htaccess:

Whenever someone accesses the following URL:
www.businessbranch.com

I want them to be redirected to:
www.somebusiness.com

However, I want the browser to display the original URL. I want this to work both ways, so that if someone accesses:
www.businessbranch.com
then they are redirected to:
www.somebusiness.com
but the original URL still shows up in the browser.

What would be the best way to do this? I want to keep it as clean as possible, and I know .htaccess stuff can get pretty jumbled if you let it. Thanks,

- DB
  #2  
Old 18-Dec-2004, 03:59
Allowee's Avatar
Allowee Allowee is offline
Regular Member
 
Join Date: May 2003
Location: The Netherlands
Posts: 339
Allowee has a spectacular aura about
for the first case you can use this apache directive

Code:
Redirect permanent /one.html http://example.com/two.php
chaning it for your code.. and it should fine

I don't think .htaccess stuff will help for the other thing

I think frames or cgi/php including the files will help with that..
A frames which loads a php file that includes the requested file would do best, but I've never done something like that before
__________________
Pastebin
PHP Documentation Site
Allowee's Blog http://allowee.net
  #3  
Old 20-Dec-2004, 09:35
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
We have discussed something like this in the past. Refer to this thread and modify the details with information specific to your situation.

I have not considered doing such a thing but I can already imagine that there will be some problems with images and other linked resources like external css files etc.

Try it and see if it works for you.
 
 

Recent GIDBlogProblems with the Navy (Chiefs) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
what the heck....how do you make .htaccess file? antimacism Apache Web Server Forum 3 02-Sep-2005 09:27
Why you need domain names ashish Web Hosting Forum 1 17-Feb-2005 23:28
How to find info on a deleted domain JUNK KED Search Engine Optimization Forum 6 27-Sep-2004 22:04
Win2k domain user dont appear in WinNT domain VoooDooo Computer Software Forum - Windows 5 18-Feb-2004 08:55
Overriding .htaccess toadatrix Apache Web Server Forum 2 02-Jan-2004 23:00

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 00:24.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.