Redirect Wordpress URLs to Lowecase

  • Answered
Hi, I'd like for and to point to the same file. I found a site that recommended adding the following to my .htaccess file: RewriteEngine on RewriteBase / RewriteMap insensitive tolower: RewriteRule ^[\/]*(.*)$ /${insensitive:$1} [R,L] The problem is, my .htaccess file is not empty. I assume the following was added by WordPress: # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress Is it possible to combine the two so that the wordpress code continues to work, but the server treats all URLs as lowercase? Many thanks!
Hello Preferred, Thank you for contacting us. There shouldn't be a problem with using both rules, as long as one rule is not interfering/contradicting the other. I also recommend grouping all the rewrite rules together. There are also plugins available for accomplishing this in Wordpress, such as "Force Lowercase URLs." For additional information on the .htaccess file, see our .htaccess file reference list . If you have any further questions, feel free to post them below. Thank you, -John-Paul