.htaccess can’t get rid of www completely
-
I added the following to .htaccess in the root directory
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ https://domain.com/$1 [R=301,L]then “www.domain.com” will become domain.com, but “www.domain.com/wordpress” doesn’t change. so I added the following to .htaccess under /wordpress
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ https://domain.com/wordpress/$1 [R=301,L]then “www.domain.com/wordpress” works. but “www.domain.com/wordpress/anything” still doesn’t change to domain.com/wordpress/anything.
what should I do now?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘.htaccess can’t get rid of www completely’ is closed to new replies.