PDA

View Full Version : Base url Redirect - won't function.


WildRover
02-16-2013, 11:46 AM
Hello, I can't figure what's gone wrong here.

The url of my site is http://www.xpower-racing.com - if you click here it shows the file structure.

The Forum is: http://www.xpower-racing.com/forum/forum.php

It stopped functioning after the Forum was updated.

There's a gallery at http://www.xpower-racing.com/gallery

If I place a redirect using Cpanel from http://www.xpower-racing.com to http://www.xpower-racing.com/forum/forum.php The gallery then becomes the same and is unusable.

Help....:mad:

nhawk
02-16-2013, 12:23 PM
The problem is you don't have anything in your home directory telling browsers where to go.

Create an index.php file and put this code in it...
<?php
header("Location: http://www.xpower-racing.com/forum/forum.php");
exit;
?>

Save it to your home directory, which is what shows now when you go to http://www.xpower-racing.com

LifesGreatestGift
02-16-2013, 12:29 PM
is that something new in PHP?

thought they needed to be
<?php

?>

never seen that way before
{?php

?}

nhawk
02-16-2013, 12:31 PM
Oops.. it's early here and I'm still having my first coffee..

Corrected it.

LifesGreatestGift
02-16-2013, 12:33 PM
I wasn't trying to be sarcastic, I just wasn't sure if that was something new or not. no problem. Kind of how they went from commenting with "#" to using ";" in ini files :) I don't keep up with the changes. If i see someone doing something "new" I assume that it may be a change with PHP.

nhawk
02-16-2013, 12:40 PM
Nope, nothing new. Just the same old brain not firing on all cylinders until my second cup of coffee. :D

I didn't think you were being sarcastic and I appreciate your pointing out the error.

WildRover
02-16-2013, 12:42 PM
The problem is you don't have anything in your home directory telling browsers where to go.

Create an index.php file and put this code in it...
<?php
header("Location: http://www.xpower-racing.com/forum/forum.php");
exit;
?>

Save it to your home directory, which is what shows now when you go to http://www.xpower-racing.com

nhamk - you are an absolute saviour. Thankyou for helping me out - much appreciated.