fixing Canonical URLs with htaccess
-
Hi, up until a few days ago i had a htaccess file in my root directory, making non www requests forward to https://www.domain i used this code below:
Options FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain\.co\.uk$ [NC]
RewriteRule (.*) https://www.yourdomain.co.uk/$1 [R=301,L]however now when this is in place the blog will not load at all, the blog is in a directory called blog, and in here is also another htaccess file with the following code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule># END WordPress
because i dont understand htaccess very well im not sure if the 2 are conflicting with each other, any help would be great.
- The topic ‘fixing Canonical URLs with htaccess’ is closed to new replies.