Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Strange SEO display problem and I am a bit lost
Author « Topic »  

ken@hauntedstudios.com
New Member

USA
58 Posts

Posted - 05/17/2019 :  07:47:42  
I have encountered a rather strange problem after adding SEO pages. I was wondering if this is a limitation inherent or if I caused it somehow, any help would be appreciated.

The problem is with the main categories page. When viewing “all products” there is a link of “Home » All Products” and when clicking on “Home” you are taken to the category home page of “https://www.hauntedstudios.com/categories.php” and it displays perfectly.
To set up SEO I added the following to my includes:

$seodetailurls=TRUE;
$seocategoryurls=TRUE;
$detlinkspacechar="_";
After the addition I noticed that the categories “Home” was displaying without any CSS control at all and instead of “https://www.hauntedstudios.com/categories.php” the browser display was “https://www.hauntedstudios.com/category/” having the effect of no longer pointing to the page “https://www.hauntedstudios.com/categories.php” but somehow displaying the contents of that page, but without any CSS formatting.

I commented out the “$seocategoryurls=TRUE;” and everything displays properly again.

It is only the categories home page that is effected, the regular category pages display properly with SEO in effect.

Just with the idea that the new, SEO page “https://www.hauntedstudios.com/category/” might point to a “category.php” page I created a clone of the “categories.php” page called “category.php” but to no good effect.

Also as a note I inspected the code for both displayed versions and the SEO version was similar but missing several lines of code at the beginning. On the categories.php page I have several includes before the “<!-- #BeginTemplate "Templates/main.dwt" -->” they are:

<?php
session_cache_limiter('none');
session_start();
ob_start();
include "vsadmin/db_conn_open.php";
include "vsadmin/inc/languagefile.php";
include "vsadmin/includes.php";
include "vsadmin/inc/incfunctions.php";
include "vsadmin/inc/metainfo.php";?><!DOCTYPE html><html lang="en">

this is missing in the SEO page that displays with the URL “https://www.hauntedstudios.com/category/”

Ideas anyone? I currently have "$seocategoryurls=TRUE;" disabled so the URL “https://www.hauntedstudios.com/category/” does not exist, but I could set the category SEO back to true if anyone needs to have a look. Thanks in advance for your help,

Ken Patterson
https://www.hauntedstudios.com

Andy
ECT Moderator

95440 Posts

Posted - 05/17/2019 :  07:50:23  
Hi Ken

You would only use $seocategoryurls=TRUE; in conjunction with extensionless URLs which require more set up than just that one line in includes.php https://www.ecommercetemplates.com/seo/search-engine-friendly-urls-php.asp

Is that what you were planning to do or was it something else you had in mind?

Andy

Please feel free to review / rate our software

ken@hauntedstudios.com
New Member

USA
58 Posts

Posted - 05/17/2019 :  08:27:55  
Andy;

Thanks for your reply. Yes, I am using the extensionless URLs, they are fully set up and working, they work on everything, all products and individual categories, except for the categories home page that displays incorrectly as noted above. Any ideas why just this one page would not display??

Ken Patterson

Andy
ECT Moderator

95440 Posts

Posted - 05/17/2019 :  08:34:34  
That's good then.

Can you make sure your base href line comes somewhere before the css lines like this example

<base href="http://www.yourstoreurl.com/" />
<link rel="stylesheet" type="text/css" href="/style.css" />

Andy

Please feel free to review / rate our software

quadrant
Ecommerce Template Guru

United Kingdom
1110 Posts

Pre-sales questions only
(More Details...)

Posted - 05/17/2019 :  08:37:07  
Hi Ken,

Do you have this in your htaccess file:
RewriteCond $1 !\.(png|gif|jpg|ico|css|js|php)$ [NC]

Regards,
David

ken@hauntedstudios.com
New Member

USA
58 Posts

Posted - 05/17/2019 :  08:45:20  
Dave;

Thanks for your input. No, I did not have that line, I did add it to no effect however. The search goes on I am afraid.

Ken Patterson

Andy
ECT Moderator

95440 Posts

Posted - 05/17/2019 :  08:50:14  
I think it's the location of the base href line as I mentioned above.

Andy

Please feel free to review / rate our software

ken@hauntedstudios.com
New Member

USA
58 Posts

Posted - 05/17/2019 :  08:53:54  
Andy;

This is what I have after <!-- #BeginEditable "head" -->:

<link href="css/ectstyle1.css" rel="stylesheet" type="text/css" />
<base href="http<?php if(@$_SERVER['HTTPS']=='on') print 's'?>://www.hauntedstudios.com/" />

Do I need to change this?

I am leaving the categories main page in extensionless mode for about an hour if you want to have a look here is the link: https://www.hauntedstudios.com/category/

Ken Patterson

Andy
ECT Moderator

95440 Posts

Posted - 05/17/2019 :  08:56:54  
You do need to change it. Move this line

<base href="http<?php if(@$_SERVER['HTTPS']=='on') print 's'?>://www.hauntedstudios.com/" />

to the editable region

<!-- #BeginEditable "doctitle" -->

<!-- #EndEditable -->

Andy

Please feel free to review / rate our software

ken@hauntedstudios.com
New Member

USA
58 Posts

Posted - 05/17/2019 :  09:03:35  
Andy;

All is now well!

I moved the base href line to to the editable region <!-- #BeginEditable "doctitle" --> and now all is well. Thank you all for your help, and thanks Andy this one really had me stumped.

Ken Patterson
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000