WebFaction
Community site: login faq

Can anyone tell me what I'm doing wrong with the following .htaccess redirect code. This seems to be the same as I've used successfully elsewhere but is producing an 'internal server error' here...

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?somedomain.co.uk [NC,OR]
RewriteCond %{HTTP_HOST} ^somedomain.co.uk [NC]
RewriteRule ^(.*)$ http://www.someother.com/$1 [R=301,NC,L]

asked 19 Jul '11, 10:38

urbanian
847
accept rate: 0%


Hi,

The code looks fine. Actually, I just tested it on my account at WebFaction and it works. There must be something else that is causing the Internal Server Error. I would suggest that you open a ticket so our support team could look at it for you.

permanent link

answered 19 Jul '11, 11:51

todork
1.2k5
accept rate: 34%

Thanks for testing it. I've created a new static app, copied the same redirect code into a new .htaccess file in that and pointed the domain being redirected at this and it now works. Weird... The only difference is that I created a new php 5.3 static app rather than a php 5.2 but I shouldn't have thought that made any difference given that no php is in use!

I'll highlight it to the support team. Thanks again. Ian.

(20 Jul '11, 02:56) urbanian

I just took out the lines Webfaction makes in your .htaccess file and everything works alright. My PHP needs are super simple though.

#Action php53-cgi /php53.cgi
#AddHandler php53-cgi .php
permanent link

answered 14 Sep '11, 07:57

ericie
1
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×76
×75

question asked: 19 Jul '11, 10:38

question was seen: 3,308 times

last updated: 24 Mar '12, 20:56

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM