Как разрешить .php, косую черту и без косой черты?
RewriteEngine on
RewriteCond %{REQUEST_URI} (.*)(\.php|\/)$
RewriteRule (.*)$ %1 [R=301,L]
DirectoryIndex index.php
#directory ban
Options All -Indexes
ErrorDocument 400 /error.php
ErrorDocument 404 /error.php
ErrorDocument 500 /error.php
FileETag MTime Size
ExpiresActive on
ExpiresDefault "access plus 86400 seconds"
# 1 WEEK
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
# 2 DAYS
<FilesMatch "\.(xml|txt|css|js)$">
Header set Cache-Control "max-age=172800, proxy-revalidate"
</FilesMatch>
# 1 MIN
<FilesMatch "\.(html|htm|php)$">
Header set Cache-Control "max-age=60, private, proxy-revalidate"
</FilesMatch>
<IfModule mod_expires.c>
# any Expires Directives go here
</IfModule>
<IfModule mod_headers.c>
# any Header directives go here
</IfModule>
<ifmodule mod_deflate.c="">
<filesmatch ".(js|css)$"="">
SetOutputFilter DEFLATE
</filesmatch>
</ifmodule>
RewriteCond %{HTTP_HOST} !^mydomain\.com$ [NC]
RewriteRule ^(.*)$ mydomain.com/$1 [R=301,L]