Skip to content
WJunction - Webmaster Forum

Redirect Code

Status
Not open for further replies.
Hello Friends Please some one give me a redirect code i mean if your forum link is www.111.com and you running forum at www.111.com/forums when u open main domain it will redirect it to forum.

i know you think that why i ask this code btw i am saved this php file at my laptop and now i am at my uncles home thats why i ask for this so please some one give this.
 

8 comments

Code:
<?php header( 'Location: [URL]http://www.111.com/forums[/URL]' ) ;
?>

save the above code as new_url.php

and edit ur .htaccess in ur /public_html or /www directory

Code:
DirectoryIndex /new_url /index.php /index.html
ErrorDocument 401 /new_url
ErrorDocument 403 /new_url
ErrorDocument 404 /new_url

this would nevver make u miss any visitor as they'd be redirected to ur forums page if they go to a dead link in ur site and the rest will work as usual ... :D
 
@ carnage its upto us to use what we want..

some hosts dont give cpanel..
they give just sql login n ftp ,
in such cases we need to use things like this..
 
Status
Not open for further replies.

About the author

N
Active Member · Joined
Warez
285
Messages
0
Reactions
16
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom