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

i used to have some type of like code that i would put in my Wamp server WWW location and whenever someone went to " " it would force them to " " 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
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]

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]

Forum Jump:

Users browsing this thread: 1 Guest(s)