Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Bidding Directory   High Bandwidth Dedicated Servers   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 05-14-2004, 02:48 PM   #1 (permalink)
Inactive
 
edbarton's Avatar
 
Join Date: 10-13-03
Location: England
Posts: 2,781
iTrader: 0 / 0%
Latest Blog:
None

edbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really nice
htaccess

Basically I have set up some add on domains but I want it to forward to these if going to the exact url.

e.g. you can currently go to www.mysite.com/myaddondomainad/ and also www.myaddondomainad.com

Basically what I want is for it to forward to the domain name address if you go to the directory bit.
edbarton is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 05-14-2004, 10:07 PM   #2 (permalink)
Moderator
 
South's Avatar
 
Join Date: 10-13-03
Location: Statesboro, Georgia
Posts: 3,075
iTrader: 0 / 0%
South is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest order
you can do that with cpanel
__________________
"The powers not delegated to the United States by the Constitution, nor prohibited by it to the States, are reserved to the States respectively, or to the people."
South is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-15-2004, 12:21 AM   #3 (permalink)
Inactive
 
edbarton's Avatar
 
Join Date: 10-13-03
Location: England
Posts: 2,781
iTrader: 0 / 0%
Latest Blog:
None

edbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really nice
you mean the redirect?

wouldn't that just redirect all who go to www.mysite.com/mysite/randompage.htm to the home page of the addon domain though? Unless I do it with each page, and to be honest with 1000 odd pages I'd rather not
edbarton is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-15-2004, 05:39 AM   #4 (permalink)
Moderator
 
South's Avatar
 
Join Date: 10-13-03
Location: Statesboro, Georgia
Posts: 3,075
iTrader: 0 / 0%
South is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest orderSouth is a web professional of the highest order
__________________
"The powers not delegated to the United States by the Constitution, nor prohibited by it to the States, are reserved to the States respectively, or to the people."
South is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-16-2004, 01:29 PM   #5 (permalink)
Contributing Member
 
Join Date: 10-14-03
Location: Top left of England, UK
Posts: 243
iTrader: 0 / 0%
Latest Blog:
None

trevHCS is liked by somebodytrevHCS is liked by somebodytrevHCS is liked by somebodytrevHCS is liked by somebodytrevHCS is liked by somebody
Send a message via MSN to trevHCS
I think something along the lines of:

[code:1:4c44006c3b]RewriteEngine on
RewriteBase /
MaxRedirects=5

RewriteRule ^thedir/(.*)$ http://www.addondomain.com/$1 [R=301,L][/code:1:4c44006c3b]

...should work. Just replace thedir with the directory name and put in one of those for each addon domain.

I haven't tried the maxredirects option in any mod_rewrite statement, but it's supposed to stop you getting into infinite loops if something goes wrong.

Trev
trevHCS is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-16-2004, 01:48 PM   #6 (permalink)
Inactive
 
edbarton's Avatar
 
Join Date: 10-13-03
Location: England
Posts: 2,781
iTrader: 0 / 0%
Latest Blog:
None

edbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really niceedbarton is just really nice
Ok, Ill give that a go.
edbarton is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-19-2004, 07:09 AM   #7 (permalink)
Contributing Member
 
FGTH's Avatar
 
Join Date: 03-06-04
Location: NY, CT, CA, AZ
Posts: 545
iTrader: 0 / 0%
Latest Blog:
None

FGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to all
Re: htaccess

Quote:
Originally Posted by cardesign
Basically I have set up some add on domains but I want it to forward to these if going to the exact url.

e.g. you can currently go to www.mysite.com/myaddondomainad/ and also www.myaddondomainad.com

Basically what I want is for it to forward to the domain name address if you go to the directory bit.
Use the following code and save it as .htaccess
Transfer it to the web-root on your server.

[code:1:f86839489e]
Redirect 301 /old-page.html http://www.new-url.com/old-page.html
Redirect 301 /myaddondomainad/ http://www.myaddondomainad.com
<Files .htaccess>
order allow,deny
deny from all
</Files>
[/code:1:f86839489e]

The first line should be applied to individual pages (you need to change "old-page.html" for your own application).

The last 4 lines prevent the .htaccess file from being read through a browser.

For future reference, here's the official apache site http://httpd.apache.org/docs/mod/mod....html#redirect
__________________
"90% of the game is half mental."
--Yogi Berra
Elizabeth Arden
FGTH is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
htaccess & SSL Sketch Coding Forum 3 08-28-2006 03:12 AM
.htaccess sim Coding Forum 5 01-24-2005 03:54 PM
What can you do with .htaccess? Jason Web Design Lobby 4 12-03-2004 11:39 PM
.htaccess help Limit Coding Forum 1 08-07-2004 10:34 AM
.htaccess Pimpen 2010 Coding Forum 15 10-21-2003 01:39 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 03:07 PM.
© Copyright 2008 V7 Inc