Skip to content

Instantly share code, notes, and snippets.

@flayder
Created September 21, 2015 12:50
Show Gist options
  • Save flayder/e509586925ed44011f2e to your computer and use it in GitHub Desktop.
Save flayder/e509586925ed44011f2e to your computer and use it in GitHub Desktop.
url сайта c www, или без
Без www
ReWriteEngine On
RewriteCond %{HTTP_HOST} ^www.myrusakov.ru$ [NC]
RewriteRule ^(.*)$ http://myrusakov.ru/$1 [R=301,L]
С www
ReWriteEngine On
RewriteCond %{HTTP_HOST} ^myrusakov.ru$ [NC]
RewriteRule ^(.*)$ http://www.myrusakov.ru/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment