Pages: [1]   Go Down
Send this topic | Print
Author Topic: 301 redirect causing an infinite loop  (Read 523 times)
jsergio123
Member
*
Offline Offline

Posts: 44


« on: September 23, 2008, 10:33:20 AM »

I have used this same code a lot to force a domain to www. but form some reason on the 110mb server it cause an infinite loop.  i am using a htaccess rewrite and here is the code

Options +FollowSymLinks
RewriteEngine On
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,L]

any ideas why it cause a loop on the 110mb server?
« Last Edit: September 23, 2008, 11:54:26 AM by jsergio123 » Logged
Piotr GRD
Honoured 110MB Member
Official 110mb Guru
*****
Offline Offline

Posts: 6665



WWW
« Reply #1 on: September 23, 2008, 04:53:14 PM »

At the 110mb www subdomain is going trough internal proxy. HTTP_HOST value never contains www part in it. For the solution for www - non-www redirections on 110mb look here:
http://www.110mb.com/forum/scripts-php-script-htaccess-removing-www-or-adding-to-site-piotr-grd-t31345.0.html

Also I recommend you to use non-www URLs, as it's faster on 110mb. With-www is slower because of handling trough internal proxy - known issue.
Logged

jsergio123
Member
*
Offline Offline

Posts: 44


« Reply #2 on: September 23, 2008, 11:03:15 PM »

thank you it was driving me crazy!
Logged
inp o҉rtb
The Gangsta
Global Moderator
Official 110mb Guru
*****
Offline Offline

Posts: 15634


experimental theologian


WWW
« Reply #3 on: September 23, 2008, 11:50:53 PM »

If it is working, please mark your question resolved.
Logged

Hi! I’m a signature virus! Add me to your signature to help me spread.
spam me: ispamspot@gmail.com

blog | my work @ deviantART | Imagine-ng image editor
Pages: [1]   Go Up
Send this topic | Print
Jump to: