Redirect URL

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
fried
Forum Newbie
Posts: 16
Joined: Tue Sep 08, 2009 5:43 am

Redirect URL

Post by fried »

Stupid question. How do I set an URL i.e. Http://www.mysite/admin/ to auto-redirect to Http://www.mysite/admin/login.php. Not sure where I set this parameter. I'm using Apache, but this information must surely be independent of the server.
User avatar
Robert07
Forum Contributor
Posts: 113
Joined: Tue Jun 17, 2008 1:41 pm

Re: Redirect URL

Post by Robert07 »

Just make the default.php file or index.php file (just make sure there is only one of these in the webroot) with the following lines:

Code: Select all

 
<?php
header("location: login.php");
?>
 
Post Reply