skip to Main Content

Php – htaccess problem with empty string in URL

I want users to only be able to access domain.com or domain.com/. Anything afterwards, even domain.com/index.php, should redirect to domain.com. I have this .htaccess RewriteBase / RewriteEngine On Options -Indexes RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTPS} =on…

VIEW QUESTION

WordPress – What are the uses of these in an .htaccess file?

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(robots.txt|[a-z0-9_-]*sitemap[a-z0-9_.-]*.(xml|xsl|html)(.gz)?) RewriteCond %{REQUEST_URI} .(css|htc|less|js|js2|js3|js4|html|htm|rtf|rtx|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|avif|avifs|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|webp|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|webm|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|ogv|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|_ttf|wav|wma|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|zip)$ [NC] RewriteRule .* - [L] is this related to endurance page cache ?

VIEW QUESTION
Back To Top
Search