1
I have this in my htaccess but can't figure out what its for. Because of the nature of rule, searching doesn't help either.
RewriteCond %{REQUEST_URI} !(/$|\.)
RewriteRule (.*) %{REQUEST_URI}/ [R=301]
Can anyone please explain what its for?
1
I have this in my htaccess but can't figure out what its for. Because of the nature of rule, searching doesn't help either.
RewriteCond %{REQUEST_URI} !(/$|\.)
RewriteRule (.*) %{REQUEST_URI}/ [R=301]
Can anyone please explain what its for?
0
This means :
If it's not true (!
) that either ((|)
):
/$
), or\.
), Then append a slash to the URI (%{REQUEST_URI}/
), and
Return the new URI to the client's browser with return code 301
([R=301]
), which means permanent redirect to the new URI, and which also
tells the browser to display the new URI in the address bar.