Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Ultimate SEO URLs - by Chemo


Guest

Recommended Posts

help I have installed the contribution and it all works well.

The URL that was http://mydomain/catalog/product_info.php?products_id=787

is now coming up as http://mydomain/catalog/pink-lady-jacket-p-787.html and working fine.

However if a link from an external site comes in using the old URL it gets converted to http://mydomain/catalog/product_info.php?c...roduct_info.php

 

Can anyone point me to the area where I have gone wrong?

 

My current httaccess file in my /catalog directory contains:

 

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}

Link to comment
Share on other sites

  • Replies 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

Sorry posted to wrong thread.

How do you delete ?

 

help I have installed the contribution and it all works well.

The URL that was http://mydomain/catalog/product_info.php?products_id=787

is now coming up as http://mydomain/catalog/pink-lady-jacket-p-787.html and working fine.

However if a link from an external site comes in using the old URL it gets converted to http://mydomain/catalog/product_info.php?c...roduct_info.php

 

Can anyone point me to the area where I have gone wrong?

 

My current httaccess file in my /catalog directory contains:

 

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}

Edited by bobgentry
Link to comment
Share on other sites

This contrib seems to be working great in RC2a -- Thanks!

Edited by jgeoff

osC v2.2 RC2a w/ no special templates

PHP Version 5.2.14 / MySQL 5.0.91-community

Link to comment
Share on other sites

  • 3 weeks later...

Hello.

 

I have problems too. I read a lot about it, but I don´t find a solution for me.

 

I had install the newest Header Tags SEO V3.0.3 and the SEO URL 2.1 d updated.

Now in the line of the browser stand for example: http://www.xxxx.de/-p-586.html and not http://www.xxxx.de/name-name-name-p-586.html

 

So I install the SEO Validation but now when I enable this I become promptly a 404 error for all sites.

 

Sorry for my english and I hope you can unterstand and help me.

Link to comment
Share on other sites

Hello.

 

I have problems too. I read a lot about it, but I don´t find a solution for me.

 

I had install the newest Header Tags SEO V3.0.3 and the SEO URL 2.1 d updated.

Now in the line of the browser stand for example: http://www.xxxx.de/-p-586.html and not http://www.xxxx.de/name-name-name-p-586.html

 

So I install the SEO Validation but now when I enable this I become promptly a 404 error for all sites.

 

Sorry for my english and I hope you can unterstand and help me.

 

2.1d updated shouldn't have this problem although I have seen it were another USU version has been previously installed.

 

Uninstall it including removing the admin configuration entries (There are posts in the USU threads about how to do this).

 

USU will automatically reinstall and should work correctly.

Edited by FWR Media
Link to comment
Share on other sites

2.1d updated shouldn't have this problem although I have seen it were another USU version has been previously installed.

 

Uninstall it including removing the admin configuration entries (There are posts in the USU threads about how to do this).

 

USU will automatically reinstall and should work correctly.

 

 

Hi, Robert.

 

Thanks.

 

Do you mean that?

 

DELETE FROM configuration_group WHERE configuration_group_title LIKE '%SEO%';

DELETE FROM configuration WHERE configuration_key LIKE '%SEO%';

Link to comment
Share on other sites

So I deleted SEO Url and made a new install, but the problems are the same....

 

I'd need to see the site Tom.

Link to comment
Share on other sites

Hi, this contribution (including Robert's fix) is working well for me but I hoping you could help me integrate it to work with the "Manufacturers 2" contribution that I have installed (I'm using v.2)

 

As I say this contribution is working fine and correctly changing all of my URL's apart from the manufacturers 2 url's. Does anyone know how they could work together?

 

Thanks,

 

Ben

Link to comment
Share on other sites

I'd need to see the site Tom.

 

 

This is the site: www.unitraders.de

 

What I also seen, that sometimes different names of article in the browser between

 

 

www.unitraders.de/sanit%C3%A4r-wasserfilter-c-24.html

 

and

 

www.unitraders.de/-c-24.html

 

The product is of course the same, only the line in the browser change.

 

You can test it when you often change between the categories.

 

 

Thanks in advance.

Link to comment
Share on other sites

This is the site: www.unitraders.de

 

What I also seen, that sometimes different names of article in the browser between

 

 

www.unitraders.de/sanit%C3%A4r-wasserfilter-c-24.html

 

and

 

www.unitraders.de/-c-24.html

 

The product is of course the same, only the line in the browser change.

 

You can test it when you often change between the categories.

 

 

Thanks in advance.

 

Tom save the below in your shop root as a php file called fwrtest.php

 

<?php

require('includes/application_top.php');

print 'Testing tep_href_link<p />';

echo 'cPath link = ' . tep_href_link(FILENAME_DEFAULT, 'cPath=24') . '<br />';

echo 'Products Link = ' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=44') . '<br />';

?>

 

Just browse to the file and report back what it prints please.

Edited by FWR Media
Link to comment
Share on other sites

Tom save the below in your shop root as a php file called fwrtest.php

 

<?php

require('includes/application_top.php');

print 'Testing tep_href_link<p />';

echo 'cPath link = ' . tep_href_link(FILENAME_DEFAULT, 'cPath=24') . '<br />';

echo 'Products Link = ' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=44') . '<br />';

?>

 

Just browse to the file and report back what it prints please.

 

 

I made it, Robert.

 

This was the output:

 

Testing tep_href_link

 

cPath link = http://www.unitraders.de/-c-24.html

Products Link = http://www.unitraders.de/-p-44.html

Link to comment
Share on other sites

I made it, Robert.

 

This was the output:

 

Testing tep_href_link

 

cPath link = http://www.unitraders.de/-c-24.html

Products Link = http://www.unitraders.de/-p-44.html

 

Hmm your site is doing something odd somewhere, my best guess would be incorrect or omitted $languages_id.

 

The reason I say that is the query to get the products_name is e.g.

 

								$sql = "SELECT products_name as pName 
											FROM ".TABLE_PRODUCTS_DESCRIPTION." 
											WHERE products_id='".(int)$pID."' 
											AND language_id='".(int)$this->languages_id."' 
											LIMIT 1";

 

There is nowhere for it to go wrong except for no $pID or no $this->languages_id.

 

Or

 

				$sql = "SELECT p.products_id as id, pd.products_name as name 
					FROM ".TABLE_PRODUCTS." p 
							LEFT JOIN ".TABLE_PRODUCTS_DESCRIPTION." pd 
							ON p.products_id=pd.products_id 
							AND pd.language_id='".(int)$this->languages_id."' 
							WHERE p.products_status='1'";

 

Where there is even less to go wrong

Edited by FWR Media
Link to comment
Share on other sites

Hmm your site is doing something odd somewhere, my best guess would be incorrect or omitted $languages_id.

 

The reason I say that is the query to get the products_name is e.g.

 

								$sql = "SELECT products_name as pName 
											FROM ".TABLE_PRODUCTS_DESCRIPTION." 
											WHERE products_id='".(int)$pID."' 
											AND language_id='".(int)$this->languages_id."' 
											LIMIT 1";

 

There is nowhere for it to go wrong except for no $pID or no $this->languages_id.

 

Or

 

				$sql = "SELECT p.products_id as id, pd.products_name as name 
					FROM ".TABLE_PRODUCTS." p 
							LEFT JOIN ".TABLE_PRODUCTS_DESCRIPTION." pd 
							ON p.products_id=pd.products_id 
							AND pd.language_id='".(int)$this->languages_id."' 
							WHERE p.products_status='1'";

 

Where there is even less to go wrong

 

 

Oh, Robert. I only understand the half.

 

Ok, anything goes wrong with my site.

What do you mean with the code above? Where is it? (index.php?)

 

Do you think it's because the language?

 

Can you say it more simple? Thanks.

Link to comment
Share on other sites

Oh, Robert. I only understand the half.

 

Ok, anything goes wrong with my site.

What do you mean with the code above? Where is it? (index.php?)

 

Do you think it's because the language?

 

Can you say it more simple? Thanks.

 

That's about as simple as I can get without getting my hands dirty. Except to say that the file where those queries are based is includes/classes/seo.class.php.

 

I doubt very much indeed that seo.class.php is responsible however.

Link to comment
Share on other sites

That's about as simple as I can get without getting my hands dirty. Except to say that the file where those queries are based is includes/classes/seo.class.php.

 

I doubt very much indeed that seo.class.php is responsible however.

 

Ugh, I think you a quite right.

I took the seo.class from 2.2.2e and changed it with the 2.1d

 

Then for a little moment it was allright. He showed me the right words in the line. But after I entered the special characters is was gone away and was the same before......

 

So, I changed more than twice the seo.clas but now he never change....

 

This is crazy.

Link to comment
Share on other sites

Do you mean that the problem with language are responsible for the mistakes with the FWR URL Validation?

This was, that I get a 404 error for all the sites, when I enabled it.

Link to comment
Share on other sites

Do you mean that the problem with language are responsible for the mistakes with the FWR URL Validation?

This was, that I get a 404 error for all the sites, when I enabled it.

 

All validation does is compare the incoming URL to a fresh URL produced by the seo.class.php if the two match it lets it through .. if it doesn't match it 301s if it doesn't exist it 404s.

 

seo.class.php is returning a URL starting with a hyphen - so validation believes the product/category does not exist.

Link to comment
Share on other sites

Hello,

 

Now you can call me stupid.

 

BUT i am stuck already trying to install ultimate seo with this =

 

 

STEP 2 - Create a cache directory

I would suggest you create a directory *OUTSIDE* your webroot so people won't be able to modify or view the cache files.

 

Once you create the directory you need to change the permissions so the webserver can write to it. Using your favorite FTP client simply select the directory and choose "CHMOD" or "properties". Give all permissions (read, write, execute - 777) to the directory.

 

Remeber the FULL FILESYSTEM PATH to this newly created directory since you will need it to configure the contribution later. Write it down!

 

 

I have no idea what that means and what a cache directory is.

Please help,

 

Paulie.

Link to comment
Share on other sites

Hello,

 

Now you can call me stupid.

 

BUT i am stuck already trying to install ultimate seo with this =

 

 

STEP 2 - Create a cache directory

I would suggest you create a directory *OUTSIDE* your webroot so people won't be able to modify or view the cache files.

 

Once you create the directory you need to change the permissions so the webserver can write to it. Using your favorite FTP client simply select the directory and choose "CHMOD" or "properties". Give all permissions (read, write, execute - 777) to the directory.

 

Remeber the FULL FILESYSTEM PATH to this newly created directory since you will need it to configure the contribution later. Write it down!

 

 

I have no idea what that means and what a cache directory is.

Please help,

 

Paulie.

 

Which version are you trying to install?, if on a linux server I suggest 2.1d updated.

Link to comment
Share on other sites

thats -

 

Ultimate SEO URLs v1.0

 

Try 2.0b I've never used a WinDoze server but I believe that may have been the latest compatible version.

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...