Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Guest

[Contribution] Ultimate SEO URLs - by Chemo

Recommended Posts

Hello from Germany!

 

1. My english is not very good and so "Sorry" :-)

2. Ich use the Seo contrib in my shop (language german). Everything works good, but if i chance the language to "english" the arcticle name change to the english name, too. Fine. But if i visit the englisch articel after an hour again, then the englisch Seo Url goes with me to the german site. Thats not good for the google index.

3. What can i chance that the english seo url always goes to the english site? (with ?language=en).

 

Do you understand what I want?

 

Thank you all!

 

Greeting from Germany

Share this post


Link to post
Share on other sites
Hello from Germany!

 

1. My english is not very good and so "Sorry" :-)

2. Ich use the Seo contrib in my shop (language german). Everything works good, but if i chance the language to "english" the arcticle name change to the english name, too. Fine. But if i visit the englisch articel after an hour again, then the englisch Seo Url goes with me to the german site. Thats not good for the google index.

3. What can i chance that the english seo url always goes to the english site? (with ?language=en).

 

Do you understand what I want?

 

Thank you all!

 

Greeting from Germany

 

Hello Germany from England :D

 

Your English is just fine and believe me the English are not the country to critisise others for not speaking foreign languages as we are generally the worst.

 

Re: your problem .. it is a difficult one .. you can redirect by .htaccess .. you can redirect via application_top based on browser language .. BUT none of those are a very good idea for SEO purposes in my opinion. Also such redirects are unreliable anyway.

 

E.g. Search engine comes to look at your site .. one of the "methods" decides the bot is not German so redirects it .. not good.

 

Sorry if it's not what you want to hear .. maybe others have better solutions.

Edited by FWR Media

Share this post


Link to post
Share on other sites
Hello Germany from England :D

 

Your English is just fine and believe me the English are not the country to critisise others for not speaking foreign languages as we are generally the worst.

 

Re: your problem .. it is a difficult one .. you can redirect by .htaccess .. you can redirect via application_top based on browser language .. BUT none of those are a very good idea for SEO purposes in my opinion. Also such redirects are unreliable anyway.

 

E.g. Search engine comes to look at your site .. one of the "methods" decides the bot is not German so redirects it .. not good.

 

Sorry if it's not what you want to hear .. maybe others have better solutions.

Thank you for your reply. I thought that I (or someone else) can only one good "If Clause" in Seo Creation File. For Example:

 

If (english article name)

then set the english season cookie.

 

or so :-)

 

So that the System knows thats the english season is startet again.

Share this post


Link to post
Share on other sites

Hi!

I added the Ultimate_Seo_Urls Version 21d to my website and it worked like a charm, no problems! Am getting ready to go live with my store and decided to move from the shop directory to the root. Everything seemed fine initially, but started getting a "404 page not found" when going to the categories and subcategories. Went into admin and reset the seo urls cache, and reset the categories box cache. Then the categories start working. But some of the other pages, shopping and product info pages started showing up as 404 page as I browsed further into the store. Turned off the SEO urls. and everything started working. When I turn SEO urls back on , I again have problems with categories, product pages. Now I currently have the SEO Urls off and my website is uploading fast - but I still cannot get to the categories, product pages, shopping cart- very slooooow. My account pages, about us pages all fine and load fast. A cache problem or something else? Thanks in advance for any advice!

Share this post


Link to post
Share on other sites
Hi!

I added the Ultimate_Seo_Urls Version 21d to my website and it worked like a charm, no problems! Am getting ready to go live with my store and decided to move from the shop directory to the root. Everything seemed fine initially, but started getting a "404 page not found" when going to the categories and subcategories. Went into admin and reset the seo urls cache, and reset the categories box cache. Then the categories start working. But some of the other pages, shopping and product info pages started showing up as 404 page as I browsed further into the store. Turned off the SEO urls. and everything started working. When I turn SEO urls back on , I again have problems with categories, product pages. Now I currently have the SEO Urls off and my website is uploading fast - but I still cannot get to the categories, product pages, shopping cart- very slooooow. My account pages, about us pages all fine and load fast. A cache problem or something else? Thanks in advance for any advice!

 

Check .htaccess

 

When the shop was in a directory RewriteBase would have been like ..

 

RewriteBase /shop/

 

In root it needs to be ...

 

RewriteBase /

 

Btw this is extremely well documented in the USU threads so you really should have looked before posting, the threads are full of this question.

Share this post


Link to post
Share on other sites

Hi,

 

I have installed the updated 2.1d version and I have installed the Independent SEO URL Validation addon.

Now... seo URLs work fine but:

 

1. In the manufacutrer's box the links are not seo (still manufacturers.php?id=...)

2. When I try to access an old url (product_info.php?products_id=xxx) I am not redirected to the new URL!

3. When I sort products by manufacturer (in the product listing of the category) Urls are also not SEO (still index.php?cPath=XXX&sort=3a&filter_id=xxx)

 

I have set redirection to true and I have installed the contribution exactly as described.

My server is an Apache/1.3.34, PHP Version: 4.4.8, MySQL 4.0.27-standard

 

 

Can anybody please help me???

Share this post


Link to post
Share on other sites

Hello again FWR Media,

 

I'm not sure if you had seen my previous post, but I did manage to finally get rid of the oscid in the urls.

I don't want to corrupt your thread, but I thought I would offer what I had to do to make this happen anyway.

 

In my case I only use osCommerce as a shell and then allow checkout through securenetshop. So the oscid wasn't needed in my case. I have no use for sessions in osCommerce. It was just in the way and produced junk duplicated pages on my site.

 

 

Line 758 in includes/classes/seo.class.php

( I delete this block of code)

						case (!isset($_SESSION['customer_id']) && defined('ENABLE_PAGE_CACHE') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')):
							$return = $link . $separator . '<osCsid>';
							break;
					case ($this->not_null($_sid)):
							$return = $link . $separator . tep_output_string($_sid);
							break;

 

 

I'm not sure it was ideal for me to delete the whole block, but it is functioning as intended.

Any points you would like to make about the code I deleted would be great. Otherwise I'll assume that I did the correct thing.

 

Maybe an option in the admin to take out the oscid in an url would be a good idea. I had read quite a few posts where others are asking for this option as well. After reading those other posts it made me realize that I would eventually find a way to do it.

 

Thanks,

Google Junky

Edited by googlejunky

Share this post


Link to post
Share on other sites

Is there a way to create more then one seo url per product

I would want 5

 

 

 

 

 

 

 

Hello again FWR Media,

 

I'm not sure if you had seen my previous post, but I did manage to finally get rid of the oscid in the urls.

I don't want to corrupt your thread, but I thought I would offer what I had to do to make this happen anyway.

 

In my case I only use osCommerce as a shell and then allow checkout through securenetshop. So the oscid wasn't needed in my case. I have no use for sessions in osCommerce. It was just in the way and produced junk duplicated pages on my site.

Line 758 in includes/classes/seo.class.php

( I delete this block of code)

						case (!isset($_SESSION['customer_id']) && defined('ENABLE_PAGE_CACHE') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')):
							$return = $link . $separator . '<osCsid>';
							break;
					case ($this->not_null($_sid)):
							$return = $link . $separator . tep_output_string($_sid);
							break;

I'm not sure it was ideal for me to delete the whole block, but it is functioning as intended.

Any points you would like to make about the code I deleted would be great. Otherwise I'll assume that I did the correct thing.

 

Maybe an option in the admin to take out the oscid in an url would be a good idea. I had read quite a few posts where others are asking for this option as well. After reading those other posts it made me realize that I would eventually find a way to do it.

 

Thanks,

Google Junky

Share this post


Link to post
Share on other sites

Hello ,

I've read 25 pages back of this post but didn't find an answer :

I've created a page like : catalog/info.php and I would like this page to be seo'd to info.html

I tried in .htaccess :

RewriteRule ^(.*)info(.*).html$ info.php [L]

 

But dont work.

I think I have something to change in seo.class.php but very hard to know what and where!

Any help would be much appreciated. Thanks.

 

Seb


Osc 2.2 MS2

Share this post


Link to post
Share on other sites

With out .htaccess file

-----------------------------------------

http://localhost/oscom/catalog/blade-runne...ectors-p-5.html

 

 

Object not found!

 

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

 

If you think this is a server error, please contact the webmaster.

Error 404

localhost

04/03/08 20:15:37

 

 

---------------------------------------

after using the .htaccess file

-----------------------------------------

Server error!

 

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

 

If you think this is a server error, please contact the webmaster.

Error 500

localhost

04/03/08 20:16:58

 

my .htaccess file is:

------------------------------------------

# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $

#

# 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)

 

# php_value session.use_trans_sid 0

# php_value register_globals 1

Options +FollowSymLinks

RewriteEngine On

RewriteBase /catalog/

 

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}

--------------------------------

 

any one help me please!


When I was born, I was cryed and everyone around me was smiling.

Live our life so at the end,

I am the one who is smiling and everyone around me is crying.

Share this post


Link to post
Share on other sites
it won't function without a htaccess file

 

try commenting out the following line and see if that helps

# Options +FollowSymLinks

 

try commenting out the following line and see if that helps

# Options +FollowSymLinks

I got 500 error message

 

 

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

 

If you think this is a server error, please contact the webmaster.

Error 500

localhost

04/03/08 20:33:48

Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5


When I was born, I was cryed and everyone around me was smiling.

Live our life so at the end,

I am the one who is smiling and everyone around me is crying.

Share this post


Link to post
Share on other sites

Please suggest the modification in .htaccess file !

-------------------------------------------------------------------

 

#Options +FollowSymLinks

RewriteEngine On

RewriteBase /catalog/

 

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}

 

-----------------------------------------------

 

# SEF BEGIN

# Change ReWrite base according to where your store is located

# / is domain.com and /catalog is domain.com/catalog

RewriteEngine on

RewriteBase /catalog/

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*) index.php

# SEF END

Edited by prafulkr

When I was born, I was cryed and everyone around me was smiling.

Live our life so at the end,

I am the one who is smiling and everyone around me is crying.

Share this post


Link to post
Share on other sites

prafulkr: You are showing .htaccess information from two totally different contributions. They are not interchangeable.

 

Your RewriteBase(if your starting point is really catalog)

You have RewriteBase /catalog/

Should be RewriteBase /catalog

Share this post


Link to post
Share on other sites
prafulkr: You are showing .htaccess information from two totally different contributions. They are not interchangeable.

 

Your RewriteBase(if your starting point is really catalog)

You have RewriteBase /catalog/

Should be RewriteBase /catalog

 

No there should be a trailing /

 

RewriteBase /

 

RewriteBase /catalog/

 

RewriteBase /catalog/shop/

 

<edit> Aaah but i see the other contribution doesn't require a trailing /</edit>>

Edited by FWR Media

Share this post


Link to post
Share on other sites
prafulkr: You are showing .htaccess information from two totally different contributions. They are not interchangeable.

 

Your RewriteBase(if your starting point is really catalog)

You have RewriteBase /catalog/

Should be RewriteBase /catalog

 

Thanks for your comments.

I will try to upload on server & if any problem occurs I will post in forum.

 

Thanks again.


When I was born, I was cryed and everyone around me was smiling.

Live our life so at the end,

I am the one who is smiling and everyone around me is crying.

Share this post


Link to post
Share on other sites
No there should be a trailing /

 

RewriteBase /

 

RewriteBase /catalog/

 

RewriteBase /catalog/shop/

 

<edit> Aaah but i see the other contribution doesn't require a trailing /</edit>>

 

 

Thanks for your comments.

I will try to upload on server & if any problem occurs I will post in forum.

 

Thanks again.


When I was born, I was cryed and everyone around me was smiling.

Live our life so at the end,

I am the one who is smiling and everyone around me is crying.

Share this post


Link to post
Share on other sites

Is add ons related to php or mysql version??

?

 

Server Information

Server Host: () Database Host: 70.85.138.111 (70.85.138.111)

Server OS: Database: MySQL 4.1.20

Server Date: 04/04/2008 17:42:18 Datebase Date: 04/04/2008 17:42:18

Server Up Time:

HTTP Server: Apache/2.0.52 (CentOS)

PHP Version: 4.3.9 (Zend: 1.3.0)


When I was born, I was cryed and everyone around me was smiling.

Live our life so at the end,

I am the one who is smiling and everyone around me is crying.

Share this post


Link to post
Share on other sites
Is add ons related to php or mysql version??

?

 

Server Information

Server Host: () Database Host: 70.85.138.111 (70.85.138.111)

Server OS: Database: MySQL 4.1.20

Server Date: 04/04/2008 17:42:18 Datebase Date: 04/04/2008 17:42:18

Server Up Time:

HTTP Server: Apache/2.0.52 (CentOS)

PHP Version: 4.3.9 (Zend: 1.3.0)

 

.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

 

that s my error log shows


When I was born, I was cryed and everyone around me was smiling.

Live our life so at the end,

I am the one who is smiling and everyone around me is crying.

Share this post


Link to post
Share on other sites
.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

 

that s my error log shows

 

mod_rewrite needs to be enabled on the server in order to use RewriteRules.

Share this post


Link to post
Share on other sites

my site url is

 

http://shaze.in/catalog/index.php

 

what would be the .htaccess file for this site.

I am not able to write .htaccess file for this site.

 

my current htaccess file contant is:

------------------------------------------------

# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $

#

# 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)

 

# php_value session.use_trans_sid 0

# php_value register_globals 1

php_value session.auto_start 0


When I was born, I was cryed and everyone around me was smiling.

Live our life so at the end,

I am the one who is smiling and everyone around me is crying.

Share this post


Link to post
Share on other sites

I dont have much idea about .htaccess

any one have e-tutorial on .htaccess or URL link so I can read online or download from there?


When I was born, I was cryed and everyone around me was smiling.

Live our life so at the end,

I am the one who is smiling and everyone around me is crying.

Share this post


Link to post
Share on other sites

Does anyone/has anyone looked at ways to remove parameters from urls? Say for example you have an SEO url indexed in google as www-domain-com/myproduct-p-1.html and as www-domain-com/myproduct-p-1.html?language=en&currency=GBP

 

It would be nice to perform a 301 redirect on the latter if the former is the default url for that language and currency and prevent i.e. google from deciding on the canonical. Does this even make sense?

 

Paul

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×