Post by Voltagescot » Wed Mar 03, 2021 11:33 pm

I've been trying do get all my redirects working probably something simple any help appreciated. I have attached images

Attachments

Screenshot_2021-03-03-15-30-27-160.jpg

Screenshot_2021-03-03-15-30-27-160.jpg (412.2 KiB) Viewed 294 times

Screenshot_2021-03-03-15-30-19-192.jpg

Screenshot_2021-03-03-15-30-19-192.jpg (358.85 KiB) Viewed 294 times

Screenshot_2021-03-03-15-30-11-619.jpg

Screenshot_2021-03-03-15-30-11-619.jpg (348.22 KiB) Viewed 294 times

Last edited by Voltagescot on Tue Mar 09, 2021 12:00 am, edited 1 time in total.

You can build your own dream or help build someone else's. O0


User avatar
New member

Posts

Joined
Wed Nov 11, 2020 6:16 am

Post by mikeinterserv » Thu Mar 04, 2021 12:00 am

So what are you trying to redirect from and how are you redirecting

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by Voltagescot » 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

You can build your own dream or help build someone else's. O0


User avatar
New member

Posts

Joined
Wed Nov 11, 2020 6:16 am

Post by mikeinterserv » Thu Mar 04, 2021 3:22 am

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

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by paulfeakins » Thu Mar 04, 2021 7:35 pm

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/

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by Voltagescot » Mon Mar 08, 2021 10:53 pm

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

You can build your own dream or help build someone else's. O0


User avatar
New member

Posts

Joined
Wed Nov 11, 2020 6:16 am

Post by mikeinterserv » Mon Mar 08, 2021 11:05 pm

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]

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by Voltagescot » Tue Mar 09, 2021 12:00 am

thankyou Mike that sorted it O0 ill update post for future users ;)

You can build your own dream or help build someone else's. O0


User avatar
New member

Posts

Joined
Wed Nov 11, 2020 6:16 am
Who is online

Users browsing this forum: No registered users and 28 guests