Last active
March 7, 2020 19:02
-
-
Save artemsites/444a326e9486933cb11b75bf40b0c2e1 to your computer and use it in GitHub Desktop.
.htaccess
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
# Редирект с домена на домен | |
RewriteCond %{HTTP_HOST} a-b.ru | |
RewriteRule (.*) http://ab.ru/$1 [R=301,L] | |
# Редирект с пути на путь | |
Redirect /path/to/old/file/old.html /path/to/new/file/new.html | |
#Редирект на url другого сайта | |
Redirect /path/to/old/file/old.html http://www.example.com/new/file/new.html | |
# https://help.dreamhost.com/hc/en-us/articles/215747748-How-can-I-redirect-and-rewrite-my-URLs-with-an-htaccess-file- | |
#Добавить возможность исполнения кода php в других расширениях | |
AddType application/x-httpd-php .php .htm .html .phtml .tpl | |
# или | |
# AddHandler application/x-httpd-php .php .htm .html .phtml .tpl | |
#Устанавливаем альтернативную страницу по-умолчанию | |
DirectoryIndex public/index.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment