Created
June 26, 2018 16:15
-
-
Save minhphong306/fe6d2e79c750253b5ae9750653b562c5 to your computer and use it in GitHub Desktop.
Combo .htaccess cho việc chuyển đổi thư mục root cho tên miền gốc
This file contains hidden or 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 | |
RewriteBase / | |
# Thay cái /webapp bằng thư mục bạn muốn chuyển | |
RewriteCond %{THE_REQUEST} /webapp/([^\s?]*) [NC] | |
RewriteRule ^ %1 [L,NE,R=302] | |
# Thay cả ở đây nữa nhá | |
RewriteRule ^(.*)$ webapp/index.php?$1 [L,QSA] |
This file contains hidden or 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 | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?$1 [L,QSA] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment