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.


 Subscribe in a reader

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

Notices




Reply
 
LinkBack Thread Tools
  #1  
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Sep 21st, 2007, 18:14
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Sep 21st, 2007, 18:36
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,797
Thanks: 0
Thanked 17 Times in 17 Posts
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!
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Sep 21st, 2007, 19:26
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: hopefully a simple question

in public_html
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Sep 21st, 2007, 21:09
Elite Veteran
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hopefully a simple question

As Alex said the public_html or www folder. AKA, the root of your web server.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Sep 21st, 2007, 21:15
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Sep 21st, 2007, 21:23
Elite Veteran
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Sep 21st, 2007, 21:30
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
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 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 18:46.


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