Skip to content

Instantly share code, notes, and snippets.

@CB9TOIIIA
Created September 3, 2016 14:32
Show Gist options
  • Save CB9TOIIIA/3167adeda8be79e75030f574e6cee8fb to your computer and use it in GitHub Desktop.
Save CB9TOIIIA/3167adeda8be79e75030f574e6cee8fb to your computer and use it in GitHub Desktop.
www to without domain - and index.php
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://domain.ru/ [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment