FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

40Frih for Help with .htaccess problem

 


Donutey
http://www.frihost.com/forums/vt-61151.html

See the above link for what's not worked so far. Everything I try seems to end in an infinite loop of redirects.

I want a functioning permanent (301) redirect using .htaccess to send all pages on donutey.frihost.net (and www.donutey.frihost.net) to www.donutey.com, which I currently have setup as a parked domain.

40Frih for the first person to solve the problem/give functional code. +20Frih Bonus if this is answered within 24 hours.

I think me having a .frihost.net account (cpanel rather than directadmin) might have something to do with the problem.

Thanks.


Last edited by Donutey on Wed Jan 03, 2007 4:01 am; edited 1 time in total
MYP415
I can do it with php, I currently use it on my site http://mypnet.frih.net to redirect it to http://www.mypnet.org and as you can see it works perfectly fine. Code is:
Code:
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.donutey.com" );
?>


just create index.php in the donutey.frih.net folder with that code
Donutey
That didn't work, although it did tell me a little bit more about the problem.

http://www.donutey.frihost.net/testredirect.php <-- See it in action

The page redirect properly if the redirect is to any page, EXCEPT the same page. For example if I put

Code:

<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.donutey.com" );
?>


on the page http://www.donutey.frihost.net/testredirect.php, the redirect would work properly, however, if I put

Code:
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.donutey.com/testredirect.php" );
?>


on that same http://www.donutey.frihost.net/testredirect.php page then I end up with the infinite loop again.
MYP415
Why would you want to redirect a page to itself? That would create an infinite loop because once the page loads the browser run the script making it go to that page again and it would then run the script again and the process would keep going making an infinite loop.

edit:don't you want to redirect to donutey.com?
Donutey
When a user or search engine visits http://www.donutey.frihost.net/index.php I want it to redirect to http://www.donutey.com/index.php. (or http://www.donutey.frihost.net/testredirect.php to http://www.donutey.com/testredirect.php) If I were to put that same php redirect that you gave as above on my index.php page as you said, it creates an infinite loop.

I'm sure I'm missing something obvious here, but that's why I'm asking. Mr. Green
MYP415
are you sure you are putting the code at http://www.donutey.frihost.net/index.php and not at http://www.donutey.com/index.php
Donutey
Yup. But as donutey.com is a parked domain I don't think it matters. Correct?
MYP415
No that shouldn't affect that
Reply to topic    Frihost Forum Index -> Miscellaneous -> Marketplace

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.