Help - Search - Members - Calendar
Full Version: Need a little refresher... index page code
OpenSourcePhoto > World Wide Web > Website Stuff
MeeksDigital
I know I did this before, but I can't remember the HTML code, nor can I find it anywhere online.

Here's the deal. I run a website for a nonprofit aviation organization, and I've just installed wordpress for them to run the blog and site off of. What I need is when someone goes to the site URL (eg. www.url.org) I need it to automatically direct to the wordpress installation i've got at "www.url.org/pages/wp-content/themes/random-image"

Any of you web-savvy people that can help me out - this would be much appreciated. I remember it as being one line of code - I just don't have that code on file anymore!

I guess this is what I get for having someone do my website for me... I'm spoiled and out of practice :-(

Thanks so much!
Shan
QUOTE(MeeksDigital @ November 24 2007, 03:45 PM) *
I know I did this before, but I can't remember the HTML code, nor can I find it anywhere online.

Here's the deal. I run a website for a nonprofit aviation organization, and I've just installed wordpress for them to run the blog and site off of. What I need is when someone goes to the site URL (eg. www.url.org) I need it to automatically direct to the wordpress installation i've got at "www.url.org/pages/wp-content/themes/random-image"

Any of you web-savvy people that can help me out - this would be much appreciated. I remember it as being one line of code - I just don't have that code on file anymore!

I guess this is what I get for having someone do my website for me... I'm spoiled and out of practice :-(

Thanks so much!


Here ya go: (save as "index.php")
CODE
<?PHP
header("Location:www.url.org/pages/wp-content/themes/random-image");
?>

Shan
Brad
Can also do it with a meta tag:

CODE
<html>
<head>
<meta http-equiv="refresh" content="0;http://www.url.org/pages/wp-content/themes/random-image">
</head>
</html>




-b
Adam Squier
It's more elegant (and much faster) with the PHP command. It's even better if you do it on the server with an .htaccess file, but it's easier to use the PHP file.
jkantor
My host has redirection built in to the control panel.
MeeksDigital
Thanks everyone! I used the HTML redirect which works really well, but i'll experiment with the PHP version as well. I appreciate the help!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.