# If mod_rewrite.c is enabled
<IfModule mod_rewrite.c>
# Enable Rewrite Engine
RewriteEngine On
# Redirect closing-slash requests if not a folder
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# All request redirect to ./index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Last active
December 10, 2022 10:16
-
-
Save rozsazoltan/9bf6e66331a98ce2976f58565f9afbc8 to your computer and use it in GitHub Desktop.
All request redirect to index.php (important in OOP PHP application)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment