Advertisement:

301 redirect script using an htaccess file ???

Aloittaja Mike72, maaliskuu 01, 2011, 07:19:17 IP

« edellinen - seuraava »

Mike72

Hi Guys,

I got my domain name yesterday and the forum works great. The only way I can get to it is by mydomainhere.com/simplemachinesforum/index.php

The domain name mydomainhere.com says Future home of something cool and don't redirect it. My hosting is at godaddy and they told me the following.

You cannot forward the domain to itself. You may want to consider a 301 redirect script using an Htaccess file.


I am lost on that. I have no problems with trying something out but I need some help on how.

Thank you

Oldiesmann

So you just want to redirect mydomain.com to mydomain.com/simplemachinesforum/index.php?

That's quite easy to do.

Delete the index.html file in the root directory and replace it with an index.php file containing the following:

<?php
header
('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.mydomainhere.com/simplemachinesforum');
?>


If you don't plan on putting anything else at that domain, you can also move the forum.
Michael Eshom
Christian Metal Fans

Mike72

Lainaus käyttäjältä: Oldiesmann - maaliskuu 02, 2011, 05:18:32 IP
So you just want to redirect mydomain.com to mydomain.com/simplemachinesforum/index.php?

That's quite easy to do.

Delete the index.html file in the root directory and replace it with an index.php file containing the following:

<?php
header
('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.mydomainhere.com/simplemachinesforum');
?>


If you don't plan on putting anything else at that domain, you can also move the forum.

Thank you so much. That solved my problem.

Advertisement: