Jump to content

Avoid redirect loop?


sphinx

Recommended Posts

Hi,

 

I'm using the 'isset' functions for my pages.

 

I want to redirect.

 

http://website.co.uk

 

 

to

 

http://website.co.uk/?1

 

 

I'm using this:

 

 

 

RewriteEngine on
RewriteCond %{HTTP_HOST} ^website\.co\.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.website\.co\.uk$
RewriteRule ^/?$ "http\:\/\/website\.co\.uk\/\?1" [R=301,L]

I'm getting a redirect loop error.

 

Is there a way to bypass this?

 

Thank you.

 

 

 

 

 

I believe what you have now translates as

(empty query string && website.co.uk) || (www.website.co.uk)
so try

RewriteCond %{HTTP_HOST} ^website\.co\.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.website\.co\.uk$
RewriteCond %{QUERY_STRING} ^$

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.