Skip to content

Instantly share code, notes, and snippets.

@eurowebpage
Created January 22, 2020 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eurowebpage/0e7be0590276780246238bf155c1a194 to your computer and use it in GitHub Desktop.
Save eurowebpage/0e7be0590276780246238bf155c1a194 to your computer and use it in GitHub Desktop.
htaccess simple redirection
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.votre-site.eu$
RewriteRule ^(.*) http://votre-site.eu/$1 [QSA,L,R=301]
RewriteEngine On
RewriteRule ^([a-zA-Z0-9\-\_]+)$ $1.php
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://votre-site.eu/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment