Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 11-21-2004, 09:45 PM   #1 (permalink)
can't help but laugh
 
irateplatypus's Avatar
 
Location: dar al-harb
page redirect question

first time to post in the programming forum.

if my website is located at "www.mydomain.com" how would i get it to default to a page that isn't located at the root?

so if the file i want displayed when people type "www.mydomain.com" is actually stored in "www.mydomain.com/randomfile/", what is the most effective way to do that? is there a way?

i apologize if this question has a ridiculously easy answer. i've done a few google searches but nothing answers my question specifically.
__________________
If you will not fight when your victory will be sure and not too costly, you may come to the moment when you will have to fight with all the odds against you and only a precarious chance for survival. There may even be a worse case. You may have to fight when there is no hope of victory, because it is better to perish than to live as slaves.

~ Winston Churchill
irateplatypus is offline  
Old 11-21-2004, 10:29 PM   #2 (permalink)
buck fush
 
maestroxl's Avatar
 
Location: Tucson, AZ
The low-tech way is to add the following tag to the -head- of your current default page:
<meta http-equiv="Refresh" content="0; URL=http://www.mydomain.com/randomfile/"> (The zero, if you didn't know, is the number of seconds you want the browser to display the current page before redirecting. Zero would tell the browser to redirect immediately, but the actual speed depends on a number of factors, so the page content might display briefly. You can always display the link as well on the page.)

Anything more complicated than that either requires a scripting language (coldfusion, asp, jsp...) or a configuration at the web server that handles the redirect. Hope that helps.
__________________
be the change you want
maestroxl is offline  
Old 11-21-2004, 11:28 PM   #3 (permalink)
Crazy
 
Location: here and there
you can also easily do this with php or javascript. but keep in mind, you should have a good reason for this especially if you rely on or desire search engine listings because many search engines penalize you for automatic redirects.

The best solution is to move your landing page to web root or to modify your webserver configuration to point to the desired page.
__________________
# chmod 111 /bin/Laden
theFez is offline  
Old 11-21-2004, 11:58 PM   #4 (permalink)
can't help but laugh
 
irateplatypus's Avatar
 
Location: dar al-harb
wow, two worthy responses in less than 2 hours. that's why i love TFP.

i wanted to keep the start page off the root for simplicity in the actual file structure and a strange desire to keep whatever i can off the root directory borrowed from areas in computing where i am much more knowledgeable.. the site just a personal one done for family reasons... so i'm sure they'll forgive me for a redirect. however, when commercial sites do this it does annoy me a bit.

i really should just knuckle down and get a scripting language like php under my belt.

thanks again for the two answers. please add more to the discussion if anything comes to mind.
__________________
If you will not fight when your victory will be sure and not too costly, you may come to the moment when you will have to fight with all the odds against you and only a precarious chance for survival. There may even be a worse case. You may have to fight when there is no hope of victory, because it is better to perish than to live as slaves.

~ Winston Churchill
irateplatypus is offline  
Old 11-22-2004, 07:37 PM   #5 (permalink)
Insane
 
Location: Wales, UK, Europe, Earth, Milky Way, Universe
Unless you control this behaviour directly at the webserver, you're leaving it up to the user's browser to decide whether they want to observe the redirect or not.

Personally, my web host offers a good menu selection options screen where i can set this behaviour at the web server level. (In case you're wondering, it just adds/changes a line to a config file in a specific directory on the server). If however you have direct access to the web server then you may want to read up on how to configure it. Search online and you should find some great tutorials, FAQ's, walkthroughs, etc. You'll find this a much more powerful way to do things so i hope you do have this option open to you.

Welcome to tilted programming
__________________
There are only two industries that refer to their customers as "users". - Edward Tufte
welshbyte is offline  
Old 11-22-2004, 09:55 PM   #6 (permalink)
Upright
 
I will usually set up a redirect default.asp page. This way I can call a redirect to any directory on my site that I want.

response.redirect "[pagename]"
theo5222 is offline  
 

Tags
page, question, redirect


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



All times are GMT -8. The time now is 01:14 PM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76