...

View Full Version : .htaccess redirect error



Dan13071992
11-18-2011, 02:44 PM
Hi, every time i use


# This allows you to redirect your entire website to any other domain
Redirect 301 / 360-tactics.co.uk/forum/index.php

in my .htaccess it redirects my website from 360-tactics.co.uk to "http://360-tactics.co.uk/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/forum/index.php/"

why is it doing this, its causing an error.

please help.

Cheers

kbluhm
11-18-2011, 03:03 PM
You need the fully qualified URL, including the scheme (most likely http://)... otherwise it is treated as relative and will trap itself in an infinite redirect loop:


Redirect 301 / http://360-tactics.co.uk/forum/index.php

Dan13071992
11-18-2011, 03:19 PM
You need the fully qualified URL, including the scheme (most likely http://)... otherwise it is treated as relative and will trap itself in an infinite redirect loop:


Redirect 301 / http://360-tactics.co.uk/forum/index.php


after doing this i am still getting the error :s

kbluhm
11-18-2011, 03:33 PM
Oh, I misread the error.

Is the redirected URL on the same site as the new URL? If so, when you load:

http://360-tactics.co.uk/forum/index.php
The .htaccess rule is always telling it to take the root `/` and redirect.

Give this a shot:


RedirectMatch ^/$ http://360-tactics.co.uk/forum/

That should only redirect if the requested URI is `/`, or empty.

Otherwise, you could always strike that from the .htaccess file and edit your root index file :P


<?php header( 'Location: /forum/', TRUE, 301 );



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum