URL ohne WWW weiterleiten zu URL mit WWW


/ Published in: Apache
Save to your folder(s)



Copy this code and paste it in your HTML
  1. RewriteEngine On
  2.  
  3. RewriteCond %{HTTP_HOST} ^domain.de$ [NC]
  4. RewriteRule ^(.*) http://www.domain.de/$1 [L,R=301]
  5.  
  6.  
  7. ### Das Gegenteil erreicht man so ##
  8.  
  9. RewriteEngine On
  10.  
  11. RewriteCond %{HTTP_HOST} ^www\.domain\.de$ [NC]
  12. RewriteRule ^(.*)$ http://domain.de/$1 [L,R=301]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.