Created
May 12, 2017 18:00
-
-
Save webmechanicx/894ab24d6bb71718a21a78de6df1d781 to your computer and use it in GitHub Desktop.
Remove of index.php in your Joomla! URLs
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
## To remove the /index.php/ part from all URLs, add two lines after the RewriteEngine statement: | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} ^/index\.php/ | |
RewriteRule ^index.php/(.*) /$1 [R,L] | |
## You can also add two lines to remove the .html suffix if it has been turned on before: | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} \.html$ | |
RewriteRule (.*)\.html$ /$1 [R,L] | |
## Adding the .html suffix | |
RewriteCond %{REQUEST_URI} !\.html$ | |
RewriteCond %{REQUEST_URI} !/$ | |
RewriteCond %{REQUEST_FILENAME} !index.php | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule (.*) /$1.html [R,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment