Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SEO problem.


holydragon

Recommended Posts

I have installed the SEO module and everything works as advertised; however, I am experiencing one problem. Whenever I go to the website and a new session is created, all of the links are appended with the session id. For example, product.php?product_id=42?osCsid=123456789 etc..

 

After I select the link I of course get a page not found error. If I go back and then reselect the same link (or any link on the page) everything works fine and the error does not occur again unless I close my browser and revisit the site.

 

Would anyone be able to advise me on how to correct this?

 

thanks

HD

Link to comment
Share on other sites

What's the SEO module? Assuming you mean one of the url rewriter contributions. if the session ID's are sticking around, it is probably the includes/configure.php file that is not setup correctly. If the page can't be found, the path in the .htaccess file is probably incorrect.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The contribution that I am using is a URL rewriter:

 

Ultimate_SEO_URLSv21d_UPDATED

 

The thing is that is only appends the session ID to the URL the first time the site is accessed (session created?). After that the osCsid is no longer appended to the URL.

 

Regards,

HD

Link to comment
Share on other sites

That's the way it is supposed to work.

 

Jack

 

So I'm supposed to get an error the first time a link is selected? And then the next time when the osCsid is not appended the URL even think should work fine? I'm not to sure this is correct. Who puts out contributions that provide a 404 error in a store but then works fine after the back button is pressed and the URL reselects the link?

 

HD

Link to comment
Share on other sites

To be honest, I can't follow your problem. You originally mentioned a page not found problem. I responded to that with what usually causes it and you replied that the session id's were going away. I responded to that and now you are back on the 404 problem. If you stick to one problem/question, it would be a lot easier to fix that and then the next can be addressed.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

To be honest, I can't follow your problem. You originally mentioned a page not found problem. I responded to that with what usually causes it and you replied that the session id's were going away. I responded to that and now you are back on the 404 problem. If you stick to one problem/question, it would be a lot easier to fix that and then the next can be addressed.

 

Jack

 

Actually, I mentioned all of the details in the original message; however, I will clarify some of the details.

 

1) The first time that I log into my site the following occurs

- If I hold the cursor over any link, the link is appended with the osCsid?AZasdasdasas.... session id

- After selecting any link I get a page not found (404) error

That is the problem

 

2) If I press the back button in the browser

- The session ID is no longer visible

- webpages all load fine

 

So in summary. each time that I visit the site a new session is created and regardless of which link I select I get a page not found (404) error. This only occurs on the first link that is selected (can be any link). Afterwards, everything runs fine.

 

I hope that clears things up a little and I appreciate your assistance.

Link to comment
Share on other sites

Seems you have installed USU wrongly.

 

In your first post you stated

 

For example, product.php?product_id=42?osCsid=123456789 etc..

 

Well that's not an SEO link and if you have installed USU it should be.

 

The seo.class would take that osc url and 301 redirect it to an SEO url and if .htaccess is wrong it would then break.

 

I don't get why it only works without an osCsid however, would need a link to the site.

Link to comment
Share on other sites

Seems you have installed USU wrongly.

 

In your first post you stated

 

For example, product.php?product_id=42?osCsid=123456789 etc..

 

Well that's not an SEO link and if you have installed USU it should be.

 

The seo.class would take that osc url and 301 redirect it to an SEO url and if .htaccess is wrong it would then break.

 

I don't get why it only works without an osCsid however, would need a link to the site.

 

Excellent point and major oversight on my end. That is not a SEO URL. I rechecking at the site and have learned the following:

 

SEO does work properly when selecting manufacturing links / information.php /etc..

 

I have product info being displayed on the main page and this is where the SEO is having a problem.

 

When I first visit the page my product has the following link..

http://www.mysite.com/product_info.php?pro...fadc13e1851b1ad

 

it should be

http://www.mysite.com/SEO_TAG.html?osCsid …..

 

When I select the link I am taken to the following page

http://www.mysite.com/alabama-retro-rise-p-45?osCsid.html

Which does not exist..

 

When I return to the main page the same product link now says

http://www.mysite.com/product_info.php?products_id=45

 

After selecting it this time is works fine; however, as you pointed out it is not a SEO URL

 

The SEO seems to be working for all other pages as I get the SEO URL. Any additional thoughts on the matter? Do you simply believe that it isn’t installed correctly? I tried to follow the letter of the law; however, small oversights can lead to big problems..

 

Here is the .htaccess file

# $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $

#

# This is used with Apache WebServers

#

# For this to work, you must include the parameter 'Options' to

# the AllowOverride configuration

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

# AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf file)

 

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

 

<IfModule mod_setenvif.c>

<IfDefine SSL>

SetEnvIf User-Agent ".*MSIE.*" \

nokeepalive ssl-unclean-shutdown \

downgrade-1.0 force-response-1.0

</IfDefine>

</IfModule>

 

# If Search Engine Friendly URLs do not work, try enabling the

# following Apache configuration parameter

#

# AcceptPathInfo On

 

# Fix certain PHP values

# (commented out by default to prevent errors occuring on certain

# servers)

#

 

<IfModule mod_php4.c>

php_value session.use_trans_sid 0

php_value register_globals 1

</IfModule>

 

<IfModule mod_php5.c>

php_value session.use_trans_sid 0

php_value register_globals 1

</IfModule>

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /

 

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}

RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}

 

RewriteCond %{HTTP_HOST} ^mysite\.com$ [NC]

RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]

 

All of your help is greatly appreciated.

Link to comment
Share on other sites

Sounds to me, and this is only conjecture as you still haven't supplied a link, like you have hardcoded product_info links on your front page.

 

Meaning they are not using the tep_href_link() function. If this is the case then USU cannot work.

Link to comment
Share on other sites

Sounds to me, and this is only conjecture as you still haven't supplied a link, like you have hardcoded product_info links on your front page.

 

Meaning they are not using the tep_href_link() function. If this is the case then USU cannot work.

 

Hello,

I have hard-coded anything in the main page and I apologize for not providing the link earlier. The link for the development site is www.claimyourshare.com.

Regards,

HD

Link to comment
Share on other sites

Hello,

I have hard-coded anything in the main page and I apologize for not providing the link earlier. The link for the development site is www.claimyourshare.com.

Regards,

HD

 

Confirmed. Whatever mod you are using on the front page is NOT using tep_href_link() (or the properties passed are malformatted) there is no other explanation as to why it is only these links that do not get formatted by the seo.class.php.

 

Check the USU thread for the & fix in includes/functions/general.php, function tep_redirect, because that does cause some odd issues.

Link to comment
Share on other sites

Confirmed. Whatever mod you are using on the front page is NOT using tep_href_link() (or the properties passed are malformatted) there is no other explanation as to why it is only these links that do not get formatted by the seo.class.php.

 

Check the USU thread for the & fix in includes/functions/general.php, function tep_redirect, because that does cause some odd issues.

 

 

MY TYPO.. I apologize. I meant to say that I have not hard coded links into the main page. I will inspect the code now (to ensure I'm looking at the right file). I did see the the_href_link() function referenced a few times.

 

A long story short.. I will review the code to see if there are any glaring bugs. Did you visit the site and see the issue that I am referring to?

 

HD

Link to comment
Share on other sites

FWR,

 

you were right about everything. It turns out a previous mod screwed things up quite a bit. I am rewriting some of the code now and already am seeing the SEO work better.

 

Thanks a million and regards,

 

HD

 

Just glad to have helped you sort it out Eliot.

 

Rob

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...