Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo


Recommended Posts

...

Question, If I move my store to the root directory what would the rewrite base look like then just remove "/torostore/catalog/"?

...

You should NOT remove the rewritebase as that tells the server where to rewrite the URLs! Instead, it'll look like your original code (a forward slash) so that it denotes the root.

Link to comment
Share on other sites

Make sure that you have that rewrite rule in your .htaccess file. The v2.X contribution rewrites more pages than just the categories and product pages...so be sure that you also updated your .htaccess file to accomodate these extra pages.

 

DevX,

I do have the above popup rule in .htaccess:

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

and here is the other .htaccess info:

Options +FollowSymLinks

RewriteEngine On

RewriteBase /torostore/catalog/

 

I have worked around the problem by commenting out: // FILENAME_POPUP_IMAGE, in seo_class.php

 

So pop-up urls are not rewritten, instead using the original format: /catalog/popup_image.php?pID=86,

but at least the pop-ups display.

 

The same problem was also worked around in Product reviews information by commenting out the line:

FILENAME_PRODUCT_REVIEWS_INFO

Here is the rewrite rule in .htaccess:

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

 

and again in Product reviews:

FILENAME_PRODUCT_REVIEWS, commented out allows product reviews to be made when non exist.

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

 

Thanks for the help. Unless you can think of anything else DevX, I'll just limp along without the above rewrites.

Link to comment
Share on other sites

Hi all,

 

I hope someone out there can give me some help. I have install the Ultimate SEO URLs v2.1 contribution (BTW: great stuff), but when I ture it on in the Admin section I am getting an "404 File Not Found" error

----

 

The requested URL /catalog/mustang-c-21.html was not found on this server.

 

----

 

My config is a follows:

 

php4.4 for apache

apache2

osCom 2.2 (installed into /var/www/localhost/htdocs/catalog/...)

mysql 4.1.14

OS LINUX 2.6.15-r1 (GenToo)

htdocs dir (/var/www/localhost/htdocs)

---------

 

I followed the install instructions for a new install (BTW: Great instruction set.)

 

in /var/www/localhost/htdocs/catalog/ I placed a .htaccess file contents below

 

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

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-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

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

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

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

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

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

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

 

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

 

I also made sure that in /etc/apache2/http.conf I set AllowOverride Options for the htdocs directory.

 

This is currently a demo site but I would like to have this working when I go live.

 

Thanks in advance for any help that anyone can give me.

 

My demo site can be found at http://www.dambaugh.com/catalog

 

Thanks,

Brian

Link to comment
Share on other sites

Hi all,

 

I hope someone out there can give me some help. I have install the Ultimate SEO URLs v2.1 contribution (BTW: great stuff), but when I ture it on in the Admin section I am getting an "404 File Not Found" error

----

 

The requested URL /catalog/mustang-c-21.html was not found on this server.

 

----

 

My config is a follows:

 

php4.4 for apache

apache2

osCom 2.2 (installed into /var/www/localhost/htdocs/catalog/...)

mysql 4.1.14

OS LINUX 2.6.15-r1 (GenToo)

htdocs dir (/var/www/localhost/htdocs)

---------

.......

Options +FollowSymLinks

RewriteEngine On

RewriteBase /

 

 

Thanks,

Brian

 

 

Try changing

RewriteBase /

to

RewriteBase /catalog/

Link to comment
Share on other sites

Try changing

RewriteBase /

to

RewriteBase /catalog/

 

Just tried that and I still see the same behavior. I cleared the caches after the change and restarted apache but still have the problem.

 

Any other thoughts?

 

Thanks,

Brian

Link to comment
Share on other sites

I am interested to see if there is any magic behind migrating from a non-OsC site to an OsC site with the Ultimate SEO URLs v2.1 contrib and maintaining your search engine rankings (as best as possible) !!

 

I was under the impression that if redirect rules were set up in the root .htaccess file to map the old site's indexed URLs to the new site's URLs, then the drop in rankings would be minimized.

 

HOWEVER, I did this and saw my Google rankings drop off the face of the Earth.

 

In my .htaccess, I have the following:

Redirect /oldsiteurl.html http://www.newsite.com/newsiteurl-i-9.html

 

Questions:

1) Can anything can done immediately to help get my rankings back up? I did a "site:www.mysite.com" and when through all of the indexed pages and made sure they were redirected to the new site. I did find about 15 pages out of 110 that were not redirected in my .htaccess file. When I clicked on the indexed URL, I got a 404 error. This may have killed me, but I am not sure.

2) In the future, what should I do differently?

Link to comment
Share on other sites

I am interested to see if there is any magic behind migrating from a non-OsC site to an OsC site with the Ultimate SEO URLs v2.1 contrib and maintaining your search engine rankings (as best as possible) !!

 

I was under the impression that if redirect rules were set up in the root .htaccess file to map the old site's indexed URLs to the new site's URLs, then the drop in rankings would be minimized.

 

HOWEVER, I did this and saw my Google rankings drop off the face of the Earth.

 

In my .htaccess, I have the following:

Redirect /oldsiteurl.html http://www.newsite.com/newsiteurl-i-9.html

 

Questions:

1) Can anything can done immediately to help get my rankings back up? I did a "site:www.mysite.com" and when through all of the indexed pages and made sure they were redirected to the new site. I did find about 15 pages out of 110 that were not redirected in my .htaccess file. When I clicked on the indexed URL, I got a 404 error. This may have killed me, but I am not sure.

2) In the future, what should I do differently?

 

Try this: http://www.oscommerce.com/community/contributions,940

 

It's an oldie but a goodie.

 

-jared

Link to comment
Share on other sites

I had a similar problem where products and categories were linking correctly, but as soon as a manufacturer was selected from the Manufacturers drop-down, it just goes to the index.php page with no manufacturer product listing.

 

I resolved the problem be setting "Enable automatic redirects?" to "false".

Everything now works fine.

 

Hope this helps.

 

 

Thanks for the tip! I got it working now thanks to you

Jesse Rooney

Link to comment
Share on other sites

I upgraded to the newer version of SEO URLs this week and I also installed the & fix listed on the contribution page.

 

However now I'm getting two new problems:

 

When a url is redirected say after you submit something and it has a '&' it is output as a url with '&;' causing the url to fail or information to be lost; leading me to believe that fix does not work, how can I fix the fix???

 

Also, when I enable page cache I start getting oSsids, disable it, no sids; I thought they were supposed to work together, what is causing this???

 

Thanks in advance for your time!

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

Thank you very much for this contribution, it's fantastic!

 

I'm also using the Credit Class & Gift Voucher contribution and when I did install Ultimate SEO URLs the Gift Voucher stoped working the way it should.

 

When I enter the redeem code in the checkout process (checkout_payment.php) a message/notice have been displayed before, informing the customer if the redeem code is OK or not. The message won't show up anymore, just a read border around the message table, no text/information is being displayed in the table.

 

I did try to take a look in the code and found out that if I replace the Ultimate SEO URLs class whit the original class in includes/functions/html_output.php the redeem message shows up again.

 

Any of you guys using both these contributions? Is there a fix or solution for this problem?

 

 

Best regards,

Peter

 

did the above ever get remedied or solved? I am experiencing the same pink box with red border and no message when i enter a redeem code into my gift voucher box. Before installing seo contrib it would display the error/confirmation message as normal.

 

Thanks a lot, David

Link to comment
Share on other sites

Hello. I'm having an issue with this contribution :(

 

It seems to install just fine, and everything appears operational. I can run transactions and everything works, EXCEPT the orders_id comes through as 0. This, obviously, screws everything up. I've read through the past couple of pages on this thread and done a quick search, but I don't have time to do an exhaustive search (the search functionality on this forum is lacking) to track this down. Can someone point me to a solution or come up with any idea as to why this is happening? Like I said, everything else appears to work fine, it just drops the orders_id--the products and all of their attributes are stored in the database, the customer is stored correctly ... everything but the order ID. As soon as I turn the contrib off (via the control panel) the orders_id comes through again.

 

I've tried turning the cache off; no dice.

 

The site is running on Fedora Core 2, PHP 4.3.11, MySQL 3.23.58.

 

Any thoughts on this would be greatly appreciated.

 

Cheers.

 

PS I might add that my install of osCommerce is pretty heavily modified. I'm not running too many contribs, but I've hacked the crap out of it to make it template the way I want it to: http://www.freedomfootbags.com/shredshop/

Link to comment
Share on other sites

Every thing went fine. I got the redirections, i was happy...

But i had to update some infos in my categories fields and when i validated them i suddently had that message :

 

Warning: main(includes/reset_seo_cache.php): failed to open stream: No such file or directory in /home/culture/public_html/catalog/admin/categories.php on line 25

 

Warning: main(): Failed opening 'includes/reset_seo_cache.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/culture/public_html/catalog/admin/categories.php on line 25

 

Warning: Cannot modify header information - headers already sent by (output started at /home/culture/public_html/catalog/admin/categories.php:25) in /home/culture/public_html/catalog/admin/includes/functions/general.php on line 128

 

can anyone give me a tip... i'm searching why and i don't understand

osCommerce 2.2ms2 - OscAffiliate 2.6 - Super Friendly Admin Menu - Header Tags Controller 2.6.3 - AJAX AttributeManager 2.5.2 - Fix Width Container - Export Universel - Configuration Cache 1.30 - RSS Feed 1.22 - TVA INTRACOM 5.0 - Order Editor 3.0.2.1 - Attribute Sorter and Copier 6.0.2 - Product Description 1.5 - InfoBoxAdmin 2.25 - ACA v2.6 SP1

Link to comment
Share on other sites

I installed SEO URL v2 2.1d on osCommerce 2.2 MS2 and I'm experiencing one Problem. The Generated URL is really screwed.

 

Instead of Generating:

http://shop.gemrunrz.com/hardware-graphics-cards-c-1_4.html

 

osCommerce is Generating them as:

http://shop.gemrunrz.comhardware-graphics-cards-c-1_4.html/

 

I've changed the configure to handle http://shop.gemrunrz.com/ as the base url instead of http://shop.gemrunrz.com and catalog is blank.

 

Does anyone have any idea what this might be and how i can fix it?

Link to comment
Share on other sites

I upgraded to the newer version of SEO URLs this week and I also installed the & fix listed on the contribution page.

 

However now I'm getting two new problems:

 

When a url is redirected say after you submit something and it has a '&' it is output as a url with '&;' causing the url to fail or information to be lost; leading me to believe that fix does not work, how can I fix the fix???

 

Also, when I enable page cache I start getting oSsids, disable it, no sids; I thought they were supposed to work together, what is causing this???

 

Thanks in advance for your time!

 

 

I got it fixed, FYI for those of you who either have problems with a sid being attached to your url or the & problem I suggest you go back to 2.0b and install redirect urls in the contrib page as well. I reverted back to that after installing the newest version and it fixed everything and it is a little faster too! :D

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

For the & redirection problems you can try this

 

in: /includes/functions/general.php

 

////
// Redirect to another page or site
 function tep_redirect($url) {
if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {
  tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
  if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
	$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL
  }
}
/////////////// add this line below /////////////
$url = preg_replace('/&/','&',$url);
/////////////////////////////////////////////////
header('Location: ' . $url);

tep_exit();
 }

////

 

Not the most effecient way of doing it but it should do the trick.

Link to comment
Share on other sites

For the & redirection problems you can try this

 

in: /includes/functions/general.php

 

/////////////// add this line below /////////////
$url = preg_replace('/&/','&',$url);
/////////////////////////////////////////////////
header('Location: ' . $url);

 

I'm not sure this will work, I think you need to use this instead:

 

$url = preg_replace('/&/','&',$url);

 

However this problem is more complicated as the seo.class uses its own reference of the tep_href_link() .

 

I tried all kinds of things, none which worked, as my biggest problem was on the Credit Card validation errors, generated from cc.php (this used the tep_redirect() function) which created an improper URL with & seperating all of the parameters.

 

I eventually found a line in seo.class.php which when changed fixed the problem up.

 

in seo.class.php line: 697, find the line with:

return htmlspecialchars(utf8_encode($link));

 

and replace with:

 

return preg_replace('/&/','&',htmlspecialchars(utf8_encode($link)));

 

I did more before this, but I think this is the most pivotal area, as any URL that is not re-written using the class will use this function when redirected. The regualr expression preg_replace() may need to be used at key areas in other files if this alone doesn't fix the problem. All I know is that I've tried everyone elses suggestion and nothing has worked but this .. I used the access logs to check what my changes were doing at the Credit Card page (thats the only page I get these & errors) although I did see some errors on the login page too.

 

Hope this helped someone.

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

Link to comment
Share on other sites

Hey guys i just installed USEO and when i go to checkout I get this error.

Forbidden

You don't have permission to access /carcustomz/osc/checkout_shipping.php on this server.

 

You may need to create an index.html page or enable the directory browsing by creating an .htaccess file containing "Options +Indexes".

 

Apache/1.3.34 Server at pro22.abac.com Port 443

 

I cant figure out why its doing that.

Here is how my .htaccess file looks

 

# $Id: .htaccess,v 1.1.1.1.12.2 2005/12/12 15:13:56 andrei 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>

Options +FollowSymLinks
RewriteEngine On 
RewriteBase /osc/

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}

# 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 0
#</IfModule>

Link to comment
Share on other sites

hi there,

 

got the contribution installed and running but there are two problems left.

 

klicking on the shop link on my webpage brings you right away to my index.php and that works fine, the next click on any categorie will produce a dynamic url, from the second click on everything works fine again.

 

and google is also producing dynamic ulrs sometimes, that's what my logfiles say.

i have uploaded the sitemaps to google with the correct links and a lot of them work fine and google follows the correct static url, but on some crawls by google, the robot produces dynamic urls.

 

any clue what that could be?

 

greetz A.C.

Link to comment
Share on other sites

hi there,

 

got the contribution installed and running but there are two problems left.

 

klicking on the shop link on my webpage brings you right away to my index.php and that works fine, the next click on any categorie will produce a dynamic url, from the second click on everything works fine again.

 

and google is also producing dynamic ulrs sometimes, that's what my logfiles say.

i have uploaded the sitemaps to google with the correct links and a lot of them work fine and google follows the correct static url, but on some crawls by google, the robot produces dynamic urls.

 

any clue what that could be?

 

greetz A.C.

 

you have no static url's.

 

if you receive session id's attached to your url's then your spider identifcation is not up to date or they are old ones (already indexed) before that.

Treasurer MFC

Link to comment
Share on other sites

what do you mean with "spider identifcation is not up to date" ?

 

and why shouldn't i have static urls?

 

please check yourself: MY STORE

 

greetz A.C.

 

if spiders receive session id's attached to your url's, those spiders are not identified as spiders as identified spiders receive no session.

 

your url's are generated and are as such by definition dynamic.

Treasurer MFC

Link to comment
Share on other sites

here are 2 examples from my logfile.

 

 

66.249.72.167 - - [03/Feb/2006:14:31:50 +0100] "GET /anri-angel-blue-ulrich-bernardi-nativity-ulrich-bernardi-p-260.html HTTP/1.1" 200 30309 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

 

 

66.249.72.167 - - [03/Feb/2006:15:52:54 +0100] "GET / HTTP/1.1" 200 7707 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

66.249.72.167 - - [03/Feb/2006:15:58:03 +0100] "GET /wintersalweide-p-728.html?osCsid=a330d2483d1abcf268113bf2169e9637 HTTP/1.1" 200 28761 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

66.249.72.167 - - [03/Feb/2006:15:58:03 +0100] "GET /zinnfiguren-c-27.html?osCsid=5921e094af6572269775ea7285c0c19a HTTP/1.1" 200 25448 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

 

 

same day, same spider, same IP...on the first exampel there are clean converted urls, on the second you see the dynamic links.

 

 

greetz A.C.

Edited by A.C.
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...