Jump to content
xisto Community
Sign in to follow this  
LegallyHigh

Help With Redirect [solved]

Recommended Posts

Okay, I want to know how can I redirect any visitor that comes to my site to the forum automatically since that is all the site is. I should have just placed the Forum in the main directory, but it's too late now and I have no wish to redo it. So how do I redirect my site using htaccess from / to /forum/ (my site is at http://forums.xisto.com/no_longer_exists/), I'm trying this script right now:
Redirect /index.php http://forums.xisto.com/no_longer_exists/
but it only redirects the index.php specifically to the forum/index.php, I need a full directory redirect script, so / will go to /forum/

Edited by yordan
added the "solved" word in title (see edit history)

Share this post


Link to post
Share on other sites

If htaccess is complicated to set up, try following simpler solutions. Using a simple index in HTML

<META http-equiv="refresh" content="5;URL=domain.to.redirect/folder/optional;
content=5 means in 5 seconds. During which time you can display a short message "You're now being redirected to..." Save it as index.html or index.htm as you like. Using a simple index in PHP

<?phpheader('Location: domain.to.redirect/');

Save it as index.php and you're redirecting.


Share this post


Link to post
Share on other sites

Thank you for the advise sir, I was actually thinking of doing that, but didn't want to have any files in the / directory, I just wanted everything in the / directory to redirect to /forum/ However, I looked through Google and found out how to use Htaccess Redirects. I tried out the Htaccess script but I found out the Htaccess script only works for non Sub Domain websites (I am a sub domain of Xisto, until I get my own .com). Later I found out that Xisto's CPanel provided a redirect option, and wallah, Problem Solved. Any way's thanks for the suggestion though.

Share this post


Link to post
Share on other sites

maybe it is too late now, but this will probably help any other who has the same problem as you, and as I did before.

 

You can use a php redirection, just create a file and name it index.php and place it in your main directory, with this code:

 

<?phpheader( 'Location: http://http://ww38.yoursite.com/new_page.html&%2339; );?>

But do not add any other type of code, for instance if you put an html tag before the code, it wouldn't work. So to keep it working, your safest bet is to simply remove all content from the page but the redirect code.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.