Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Seo Not Working On Sitemap And 301S Rate Topic   - - - - -

 
  • IsItFast
  • Senior Member
  • Members
  • Join Date: 16-Sep 08
  • 547 posts

Posted 21 September 2018 - 06:59 PM #1

Not sure how long this has been going on but since the switch over to full site https I have been having all kinds of issues.  These may be old issues but just now discovering them thanks to some errors within the Google console.

  1. On my 301 redirects it is not showing an SEO friendly title nor is it https. Example: Old URL: /yamaha-decals/6-yamaha-decal-sticker.html New URL: http://fastdecals.co...roduct_id=29780 Is this correct?
  2. None of the links are SEO friendly in my sitemap. I've checked other stores using CS and their sitemaps all show SEO friendly URLs in the sitemap.  All links look like this: https://fastdecals.c...ategory_id=217 Links within my store are SEO friendly though.

Below is what is in my .htaccess file.  Is there anything that stands out that would cause this not to work?

DirectoryIndex index.html index.php

<IfModule mod_deflate.c>
	# Compress HTML, CSS, JavaScript, Text, XML, fonts
	AddOutputFilterByType DEFLATE application/javascript application/x-javascript text/javascript application/json
	AddOutputFilterByType DEFLATE application/x-font application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf font/opentype font/otf font/ttf application/x-woff application/x-font-woff
	AddOutputFilterByType DEFLATE text/css text/html text/plain

	<IfModule mod_headers.c>
		# Remove browser bugs (only needed for really old browsers)
		BrowserMatch ^Mozilla/4 gzip-only-text/html
		BrowserMatch ^Mozilla/4\.0[678] no-gzip
		BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
		Header append Vary User-Agent
	</IfModule>
</IfModule>

<IfModule mod_headers.c>
	<FilesMatch "\.(ttf|ttc|otf|eot|woff|css|png|gif|ico|jpe?g)$">
		Header set Access-Control-Allow-Origin "*"
	</FilesMatch>
</IfModule>

# Cache all images for 2 weeks
<IfModule mod_expires.c>
	<FilesMatch "\.(jpg|jpeg|png|gif|tiff|bmp|js|css)$">
	    ExpiresActive on
	    ExpiresDefault "access plus 2 weeks"
	</FilesMatch>
</IfModule>

<IfModule mod_headers.c>
	<filesMatch "\.(gif|png|jpg|jpeg|ico|js|css)$">
		Header set Cache-Control "max-age=1209600"
	</filesMatch>
</IfModule>


<IfModule mod_rewrite.c>
RewriteEngine on
# Please note that RewriteBase setting is obsolete use it only in case you experience  some problems with SEO addon.
# Some hostings require RewriteBase to be uncommented
# Example:
# Your store url is http://www.yourcompany.com/store/cart
# So "RewriteBase" should be:
# RewriteBase /store/cart
RewriteBase /shop
Options -MultiViews

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_URI} ^api/(.*)$ [or]
RewriteCond %{REQUEST_URI} .*/api/(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*api/(.*)$ api.php?_d=$1 [L,QSA]

RewriteCond %{REQUEST_URI} \.(png|gif|ico|swf|jpe?g|js|css|ttf|svg|eot|woff|yml|xml)$ [or]
RewriteCond %{REQUEST_URI} store_closed.html$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?)\/(.*)$ $2 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L,QSA]

</IfModule>

# This prevents possible problems when downloading files
<IfModule mod_php5.c>
    php_flag zlib.output_compression Off
</IfModule>

V4.3.1 with about 10,000 highly customizable products. Several mods done....some of which now come standard with CS now. (Started with V1.3.5)

V3.0 in a few other small stores.


 
  • remoteone
  • Member
  • Members
  • Join Date: 06-Oct 09
  • 742 posts

Posted 27 June 2019 - 04:11 AM #2

I see no one replied.  I have similar issue with a csc v2.14 store

Although sitemap.html shows HTTPS and SEF urls the re-generated sitemap.xml still shows only HTTP!

<lastmod>2019-06-27</lastmod> shows it has regenerated,  but why without https?

 

Did you find a solution?



 
  • IsItFast
  • Senior Member
  • Members
  • Join Date: 16-Sep 08
  • 547 posts

Posted 28 June 2019 - 08:27 PM #3

Wish I could tell you what I did but not sure.  Normally I post the solution on here but did not this time for some reason.  I do know it is working now. 


V4.3.1 with about 10,000 highly customizable products. Several mods done....some of which now come standard with CS now. (Started with V1.3.5)

V3.0 in a few other small stores.


 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3841 posts

Posted 29 June 2019 - 04:11 AM #4

I see no one replied.  I have similar issue with a csc v2.14 store

Although sitemap.html shows HTTPS and SEF urls the re-generated sitemap.xml still shows only HTTP!

<lastmod>2019-06-27</lastmod> shows it has regenerated,  but why without https?

 

Did you find a solution?

 

Have you done everything that this article describes for 2.1.x? https://kb.cs-cart.c...tps-whole-store



 
  • remoteone
  • Member
  • Members
  • Join Date: 06-Oct 09
  • 742 posts

Posted 29 June 2019 - 06:58 AM #5

Thanks,  Yes. 

I'd made the change to addons/seo/func.php, 

- set Google Sitemap: Options>General>Update frequency: Always

- flush local DNS,  and browser cookies/cache

- &cc cleared cache

But  [sitemap.xml]  shows SEF urls are re-generated as HTTP even though the sitemap.html  links are all https.

 

https://onwireless.com.au/sitemap.htmllinks are https: // but ...

 

sitemap.xml

<urlset xsi:schemaLocation="http://www.sitemaps..../sitemap/0.9   http://www.sitemaps....9/sitemap.xsd">

<url>
  <loc>http://onwireless.com.au/</loc>
  <lastmod>2019-06-29</lastmod>
  <changefreq>always</changefreq>
  <priority>1</priority>
</url><url><loc>http://onwireless.com.au/3g....... etc

 

 


 
  • remoteone
  • Member
  • Members
  • Join Date: 06-Oct 09
  • 742 posts

Posted 29 June 2019 - 08:00 AM #6

It appears that the v2.0.x files may be remaining, not updated for some reason.

Is it possible for someone to post the correct v2.1.4 files for me to check  against my files?

need v 2.1.4 original files as follows.:

  addons/form_builder/controllers/customer/pages.post.php

  core/fn.control.php

 

 

 

 


 
  • remoteone
  • Member
  • Members
  • Join Date: 06-Oct 09
  • 742 posts

Posted 29 June 2019 - 09:09 AM #7

not sure if I did the right thing but I made a hard code mod to /addons/google_sitemap/func.php that has helped,  but its not documented.

 

0 Links


 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3841 posts

Posted 29 June 2019 - 10:52 AM #8

 

not sure if I did the right thing but I made a hard code mod to /addons/google_sitemap/func.php that has helped,  but its not documented.

 

0 Links

 

 

So it is fixed? If so, what changes did you make?



 
  • remoteone
  • Member
  • Members
  • Join Date: 06-Oct 09
  • 742 posts

Posted 29 June 2019 - 12:57 PM #9

I actually have no expertise in php but I just replaced 3 instances of 'http' with 'https' . in /addons/google_sitemap/func.php

Ie

	if (count($languages) == 1) {
		$links[] = fn_url($link, 'C', 'https', '&amp;', CART_LANGUAGE);
	} else {
		foreach ($languages as $lang_code => $lang) {
			$links[] = fn_url($link . '&amp;sl=' . $lang_code, 'C', 'https', '&amp;', $lang_code);
		}
	}

and

			if ($seo_enabled) {
				$name = $location . '/sitemap' . $i . '.xml';
			} else {
				$name = fn_url('xmlsitemap.view?page=' . $i, 'C', 'https', '&amp;');
			}

It partially works,  but the main url is still generated as http,  so my guess is this would stuff things if the SSL was off.

Temporary partial workaround at best.
 

Is it possible for someone to post the correct v2.1.4 files for me to check  against my files?

need v 2.1.4 original files as follows.:

  addons/form_builder/controllers/customer/pages.post.php

  core/fn.control.php

 

 


 
  • remoteone
  • Member
  • Members
  • Join Date: 06-Oct 09
  • 742 posts

Posted 29 June 2019 - 01:35 PM #10

Update:  also replaced the three occurrences of 'config.http_location' with 'config.https_location' in /addons/google_sitemap/func.php

All urls in sitemap.xml are now https.

Its a workaround that no doubt stuff things if SSL is disabled. It would be better to have a proper fix.



 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3841 posts

Posted 29 June 2019 - 01:55 PM #11

Files requested for 2.1.4.

Attached Files



 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3841 posts

Posted 29 June 2019 - 02:30 PM #12

Update:  also replaced the three occurrences of 'config.http_location' with 'config.https_location' in /addons/google_sitemap/func.php

 

This would lead me to believe that the secure path in config.local.php isn't correct.?



 
  • remoteone
  • Member
  • Members
  • Join Date: 06-Oct 09
  • 742 posts

Posted 01 July 2019 - 11:32 AM #13

Thanks The Tool.  My files were correct.
Re "secure path in config.local.php", https is working but I'll investigate further.
Cheers

 
  • remoteone
  • Member
  • Members
  • Join Date: 06-Oct 09
  • 742 posts

Posted 01 July 2019 - 12:08 PM #14

Perhaps the issue is that our store,  onwireless.com.au is an addon domain to the Primary server domain of onwireless.net
Thus https://onwireless.com.au is located at https://onwireless.net/store.
So may be the installation does not really fit either scenario detained in the documentation.
 
Anyhoo.. the workaround has solved the issue, I need to spend time working on the new software platform now.
Thanks for the help. Much appreciated.
 


0 Links