hopefully a simple question

This is a discussion on "hopefully a simple question" within the Hosting & Domains section. This forum, and the thread "hopefully a simple question are both part of the Hosting Related category.



Go Back   Webforumz.com > Main Forums > Hosting Related > Hosting & Domains

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 21st, 2007, 18:01
Junior Member
Join Date: May 2007
Location: London
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
hopefully a simple question

hi,

can you help? if I have a site under one url and want to redirect another url to a specific page on that site, what's the best way to do it?

thanks,
adam
Reply With Quote

  #2 (permalink)  
Old Sep 21st, 2007, 18:14
alexgeek's Avatar
Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,771
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: hopefully a simple question

if you site is using php it's fairly easy
or .htaccess if you have a linux server.
aswell as javascript (but some people disable it)
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #3 (permalink)  
Old Sep 21st, 2007, 18:36
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,637
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: hopefully a simple question

Following on from what Alex said:

.htaccess way:- http://www.webweaver.nu/html-tips/web-redirection.shtml (best way)

PHP redirect:- http://php.net/header

Javascript redirect (wouldnt recommend):- http://www.tizag.com/javascriptT/javascriptredirect.php

Personally i would go with the PHP/.htaccess version.

Good luck!
Reply With Quote
  #4 (permalink)  
Old Sep 21st, 2007, 19:22
Junior Member
Join Date: May 2007
Location: London
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hopefully a simple question

Thanks, I'll need it. The first link you kindly provided seems just the thing, the only thing I'm not sure of is where (via FTP?) the .htaccess file should be placed. The domain I want it in shows empty html and cgi-bin folders, does it belong in either of those?
Reply With Quote
  #5 (permalink)  
Old Sep 21st, 2007, 19:26
alexgeek's Avatar
Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,771
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: hopefully a simple question

in public_html
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #6 (permalink)  
Old Sep 21st, 2007, 21:09
JacobHaug's Avatar
SuperMember

SuperMember
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JacobHaug Send a message via MSN to JacobHaug
Re: hopefully a simple question

As Alex said the public_html or www folder. AKA, the root of your web server.
Reply With Quote
  #7 (permalink)  
Old Sep 21st, 2007, 21:15
alexgeek's Avatar
Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,771
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: hopefully a simple question

Quote:
Originally Posted by JacobHaug View Post
As Alex said the public_html or www folder. AKA, the root of your web server.
quick question.
if its in root (public_html)
does it apply to all subfolders?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #8 (permalink)  
Old Sep 21st, 2007, 21:23
JacobHaug's Avatar
SuperMember

SuperMember
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JacobHaug Send a message via MSN to JacobHaug
Re: hopefully a simple question

Yes, normally depending on how it is written it does apply to sub-folders. Although, it will not apply to sub-domains, or addon-domains.
Reply With Quote
  #9 (permalink)  
Old Sep 21st, 2007, 21:30
alexgeek's Avatar
Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,771
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: hopefully a simple question

Quote:
Originally Posted by JacobHaug View Post
Yes, normally depending on how it is written it does apply to sub-folders. Although, it will not apply to sub-domains, or addon-domains.
Ahh thanks
I'm going to try and master htaccess,
it's a shame there aren't many good tutorials on it
well at least not any i have found
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #10 (permalink)  
Old Sep 21st, 2007, 22:02
Junior Member
Join Date: May 2007
Location: London
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hopefully a simple question

Me neither.. Thanks for all your help. I use Media Temple Gridserver account under the main domain eostreorganics.org. I have several other domains hosted on that account, they count as sub domains, at least I think so.
When I access the server at the root there are several folders, like so




all the URLs are in the domains folder. I want to reroute londonorganics.info to eostreorganics.org/wherelondon.html

I'm not sure what exactly needs to be written in the .htaccess file, but I'm guessing something along the lines of

Redirect 301 londonorganics.org/index.html http://www.eostreorganics.org/wherelondon.html

Only, as you can see in the .jpg, there is already an .htaccess file at the server's root level. It was created when the gridserver account was created and contains, as far as I can tell, the following code.

RewriteEngine On
RewriteRule ^domains/[^\/]+/html/webstats[/]?$ https://beta-ac.mediatemple.net/services/manage/grid/reports/urchin/xxxxxx/urchin.cgi [R]

So, I'm guessing I need to edit that existing .htaccess file. Have I got that much right?
If so, anyone got any idea what the .htaccess file's code should be to achieve what I want?

Last edited by newoptical; Sep 21st, 2007 at 23:07.
Reply With Quote
Reply

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
simple question Daniel Web Page Design 29 Feb 6th, 2007 17:23
Simple CSS Question welshie Web Page Design 9 Jan 31st, 2007 12:22
a simple question (I think) Colm Osiris Introduce Yourself 4 Feb 8th, 2006 20:00
a simple question (I think) Colm Osiris Web Page Design 2 Feb 5th, 2006 09:17
A simple Question... Lizard- Classic ASP 11 Aug 11th, 2004 08:45


All times are GMT. The time now is 22:11.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43