Page 1 of 1

(SOLVED)Redirects not directing

Posted: Wed Mar 03, 2021 11:33 pm
by Voltagescot
I've been trying do get all my redirects working probably something simple any help appreciated. I have attached images

Re: Redirects not directing

Posted: Thu Mar 04, 2021 12:00 am
by mikeinterserv
So what are you trying to redirect from and how are you redirecting

Re: Redirects not directing

Posted: Thu Mar 04, 2021 2:38 am
by Voltagescot
Hi

basically i want all my domain directs to point to the same place my website so non-www. and www. point to my site as you can see from the images its picking up that non-www. isnt forwarding correctly so it shows broken images i cant remember what file to do the forwarding edits doing 101 things at the moment

Re: Redirects not directing

Posted: Thu Mar 04, 2021 3:22 am
by mikeinterserv
Well the redirect is working fine as per status 200
You have your store set to www in config so you need to point non www to www
You can add this to your htaccess if you want the icons and images to appear in non www

Code: Select all

<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css|css)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
Also your freetools.seobility appears slightly misleading as the http to https redirect are fine on non www and www
It says incorrect target - the target should always be in this case https://www.yourdomain.com/index
There is just NO non www to www redirect at all
Are you using htaccess to redirect, if so post it

Re: Redirects not directing

Posted: Thu Mar 04, 2021 7:35 pm
by paulfeakins
Voltagescot wrote:
Thu Mar 04, 2021 2:38 am
Hi

basically i want all my domain directs to point to the same place my website so non-www. and www. point to my site as you can see from the images its picking up that non-www. isnt forwarding correctly so it shows broken images i cant remember what file to do the forwarding edits doing 101 things at the moment
This should help: https://www.antropy.co.uk/blog/how-to-r ... and-https/

Re: Redirects not directing

Posted: Mon Mar 08, 2021 10:53 pm
by Voltagescot
Code:

# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTP_HOST} voltagescotland\.co\.uk [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.voltagescotland.co.uk/$1 [R,L]
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]


Thanks for the help guys and paul you had your coffee this morning :laugh: ;D

Re: Redirects not directing

Posted: Mon Mar 08, 2021 11:05 pm
by mikeinterserv
Try this

Replace

Code: Select all

RewriteCond %{HTTP_HOST} voltagescotland\.co\.uk [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.voltagescotland.co.uk/$1 [R,L]
With

Code: Select all

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule (.*) https://www.voltagescotland.co.uk%{REQUEST_URI} [NE,L,R=301]

Re: Redirects not directing

Posted: Tue Mar 09, 2021 12:00 am
by Voltagescot
thankyou Mike that sorted it O0 ill update post for future users ;)