Created
February 15, 2018 06:58
-
-
Save poloey/ff785fb0cbcc15c0719aaab59f0adffe to your computer and use it in GitHub Desktop.
rewrite htaccess for rewrite all request except media file
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
Options +FollowSymLinks -MultiViews | |
RewriteEngine On | |
# Redirect requests to index.php | |
RewriteCond %{REQUEST_URI} !=/index.php | |
RewriteCond %{REQUEST_URI} !.*\.png$ [NC] | |
RewriteCond %{REQUEST_URI} !.*\.jpg$ [NC] | |
RewriteCond %{REQUEST_URI} !.*\.css$ [NC] | |
RewriteCond %{REQUEST_URI} !.*\.gif$ [NC] | |
RewriteCond %{REQUEST_URI} !.*\.js$ [NC] | |
RewriteRule .* /index.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment