WebFaction
Community site: login faq

I wonder what is better to implement simple redirects (from performance perspective) - static cgi with .htaccess ot apache rewrites inside httpd.conf?

I have the following needs (ex: mydomain.com)

  1. redirect all mydomain.com to www.mydomain.com
  2. redirect all *.mydomain.ca to www.mydomain.com

mydomain is a django app btw, and I am using VirtualHosts in httpd.conf to serve multiple domains.

Thanks in advance

asked 11 Apr '12, 13:18

wfuser
11
accept rate: 0%


It would be more efficient to do your rewrites via a separate static/cgi/php app, as described in our documentation (Redirect a Domain with a Static/CGI/PHP App), because that frees up your own backend Apache from handling those requests.

permanent link

answered 11 Apr '12, 16:05

seanf
12.2k41836
accept rate: 37%

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
×26
×6
×6
×4

question asked: 11 Apr '12, 13:18

question was seen: 2,319 times

last updated: 11 Apr '12, 16:05

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