Skip to content

Margus Roo –

If you're inventing and pioneering, you have to be willing to be misunderstood for long periods of time

  • Cloudbreak Autoscale fix
  • Endast

apache mod_rewrite hints

Posted on October 12, 2009 - January 9, 2012 by margusja

Rewrite if no https and no www

RewriteEngine on

RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://www.test.ee/$1 [L,R]

—

RewriteEngine on
RewriteCond %{HTTP_HOST}  CONDITION_1 [OR]
RewriteCond %{HTTP_HOST} CONDITION_2 [OR]
RewriteCond %{HTTP_HOST} CONDITION_N [OR]
RewriteCond %{HTTP_HOST} !^www\.test\.ee [NC]
RewriteRule (.*) https://www.test.ee$1 [L,R]

Rewrite if no request uri

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteRule ^(.*)$ http://www.example.com [L,R]

 

domain.com -> www.domain.com

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yourdomain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]

Posted in Linux

Post navigation

Viimasel ajal tundub…
Kontor

The Master

Categories

  • Apache
  • Apple
  • Assembler
  • Audi
  • BigData
  • BMW
  • C
  • Elektroonika
  • Fun
  • Hadoop
  • help
  • Infotehnoloogia koolis
  • IOT
  • IT
  • IT eetilised
  • Java
  • Langevarjundus
  • Lapsed
  • lastekodu
  • Linux
  • M-401
  • Mac
  • Machine Learning
  • Matemaatika
  • Math
  • MSP430
  • Muusika
  • neo4j
  • openCL
  • Õpetaja identiteet ja tegevusvõimekus
  • oracle
  • PHP
  • PostgreSql
  • ProM
  • R
  • Turvalisus
  • Varia
  • Windows
Proudly powered by WordPress | Theme: micro, developed by DevriX.