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.
|
|
|
|
|
![]() |
||
hopefully a simple question
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
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 |
|
|
|
#2
|
||||
|
||||
|
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)
|
|
#3
|
||||
|
||||
|
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. |
|
#4
|
|||
|
|||
|
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?
|
|
#5
|
||||
|
||||
|
Re: hopefully a simple question
in public_html
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#6
|
|||
|
|||
|
Re: hopefully a simple question
As Alex said the public_html or www folder. AKA, the root of your web server.
|
|
#7
|
||||
|
||||
|
Re: hopefully a simple question
Quote:
if its in root (public_html) does it apply to all subfolders?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#8
|
|||
|
|||
|
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.
|
|
#9
|
||||
|
||||
|
Re: hopefully a simple question
Quote:
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)
|
|
#10
|
|||
|
|||
|
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. |
![]() |
| Thread Tools | |
|
|
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 |