Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Website kinda redirect code?
#1
So i have a domain like " Test.com " and MyBB would be " Test.com/Forums "

i used to have some type of like code that i would put in my Wamp server WWW location and whenever someone went to " Test.com " it would force them to " Test.com/Forums " but i forgot how to do that, and i can't find any way on how to do it.

I just want like a php text file that i can just make it redirect to there, thanks Big Grin
Reply
#2
Well that is simple, you can do .htaccess redirect on your live site
Add this code in .htaccess file in root
RewriteEngine on
RewriteRule ^$ /Forums/ [L]

Regards
WallBB
Reply
#3
There are two ways to do that,
1) using index.php(create an index.php in your root directory with following content)
<?php header('Location: /forum/');?>

2) using .htaccess with 301 redirect(you have to create a .htaccess file in root directory with following content)
RewriteRule ^$ /forum [L,R=301]
Htaccess code is same as wallbb said i just added an R flag.
[Image: cafaf18ba2.gif]
FileSquid is under development
[Image: trk1]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)