LegallyHigh 0 Report post Posted April 12, 2008 (edited) 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 April 16, 2008 by yordan added the "solved" word in title (see edit history) Share this post Link to post Share on other sites
BuffaloHelp 24 Report post Posted April 13, 2008 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
LegallyHigh 0 Report post Posted April 14, 2008 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
mikesoft 0 Report post Posted April 16, 2008 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