Removing /index.php/ from URLS

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Mon Jul 12, 2021 10:19 am

Removing /index.php/ from URLS

Post by gabrielnb » Thu Jul 29, 2021 9:19 am

Hello. I have checked my .htaccess,I think mabe is wrong, what should I remove? thanks
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
## End - Custom redirects

# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).

# RewriteBase /

## Begin - Joomla! core SEF Section.
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
## End - Joomla! core SEF Section.

# Redirect /index.php to / - will also clear /index.php/something to /something RewriteCond %{THE_REQUEST} ^[A-Z]+\ /index\.php(/[^\ ]*)?\ HTTP/ RewriteRule ^index\.php(/(.*))?$ /$2 [R=301,L]

User avatar
Joomla! Master
Joomla! Master
Posts: 13655
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Removing /index.php/ from URLS

Post by toivo » Thu Jul 29, 2021 11:02 am

Toivo Talikka, Global Moderator

Post Reply

Return to “General Questions/New to Joomla! 3.x”