Jump to content
spidometrs

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

Recommended Posts

Hi all,

 

Just installed Ultimate SEO Urls v2.1d in 2 shops.

 

The smallest shop with about 500 products works fine with this contri, so this is great ;-)

 

The second shop with about 30000 products gives an error:

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 11796480 bytes) in /path_to_shop/includes/classes/seo.class.php(1744) : eval()'d code on line 21846

 

Software and contri's for both these shops is exactly the same.

If i disable Ultimate SEO's all works well in the old way.

 

In the contri page for Ultimate SEO there is a solution for such a kind of memory error but this didn't work for me...

 

Maybe anyone can help me with this error?

 

Thanks,

Eric :rolleyes:

Share this post


Link to post
Share on other sites
...The second shop with about 30000 products gives an error:

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 11796480 bytes) in /path_to_shop/includes/classes/seo.class.php(1744) : eval()'d code on line 21846

...Eric :rolleyes:

There is a fix for this problem on the u-seo urls download page. Maybe you can give it a try? I haven't tried it myself so I can tell whether it works or not. Hope it works for you.

 

Ken


commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites

I installed today Ultimate SEO ver 2.1d, then after I installed it everything was running fine, but I noticed the URL's it was producing wasn't quite what I thought it would be I updated to Ultimate SEO's ver 2.1d with optional Admin settable product and category URL's.

 

Since doing this my site seems slow as mollasses, I then updated the fixed seo_class.php from March, 2007, thinking possibly that might be my problem, not so.

 

I have reset my SEO cache as the instructions have said to do, I followed the instructions on the updates to a T, including the "additional" instructions with the settable URL's.

 

I tried on my first category to change to a settable URL and I notice that every time I make an Edit I have to upload every picture file when I make an edit or the image is no longer present. The site is still slow as mollasses, the settable category URL's makes a longer URL than before adding a whole bunch of numbers to the end of the URL, than before I manually set it in the URL shown when I test it on the site, so after the first category I stopped.

 

Is there some setting I do not have correct that is causing the images to have to be re-uploaded with every edit I do? Is there a setting that needs edited to make the pages load faster? I left everything the way it was defaulted to after the installations, with the only Osc store confirguration being done was to reset the SEO cache.

 

What am I doing wrong to get a URL without all the extra mumbo jumbo? If any one wants to look at the site to see what I am referring to its www.collegenuthut.com the category I tried the settable URL was Alabama Crimson Tide, all the other categories, which actually look much cleaner than the one I set the URL for, are untouched with the settable URL feature. Is it possible with this contribution of SEO to get urls such as: www.collegenuthut.com/Alabama-Crimson-Tide/Wall-Clock or am I just expecting more than what is possible?

 

Thank you very much in advance to all of those who can help!!

Share this post


Link to post
Share on other sites
There is a fix for this problem on the u-seo urls download page. Maybe you can give it a try? I haven't tried it myself so I can tell whether it works or not. Hope it works for you.

 

Ken

 

Hi Ken,

 

I already tried that solution but i still get the same error when opening my shop...

So i don't have a clue yet.

 

Thanks for your help,

Eric :rolleyes:

Share this post


Link to post
Share on other sites
..I already tried that solution but i still get the same error when opening my shop...

I have yet to come across this problem myself so I can't test it. Let's assume the error msg is genuine and add this line at the beginning of seo.class.php:

 

ini_set("memory_limit","xxM");

 

Replace xx with a number that may fix the problem, hopefully.

 

Ken

Edited by GemRock

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites
i get error when enable ultimate SEO,when clicking the "buy now" button in product_listing,it leads to cart but no product is in it (your cart is empty)

i realize the link when hover to the buy now button is

http://localhost/shop/cngtccm-c-22.html?pr...e1688cc9274f76f

 

so i disable ultimate seo and the link become:

http://localhost/shop/index.php?cPath=22&a...e1688cc9274f76f

and the problem is fixed

 

can someone tell me exactly what this problem is and how to fix?i realize "sort2a" in the link but no idea

thanks a lot

 

I'm getting this same problem. I believe it is to do with the combination of the SEO changes and the sort that is allowed on the product_listing.php page. I have also installed the All Products contribution (http://www.oscommerce.com/community/contributions,1501/) and that page has exactly the same coding for buy it now button and it works fine. There is, however, no sort allowed on the list.

 

Does anyone have any idea how to fix this (other than to remove the sort option)?

 

Thanks

Share this post


Link to post
Share on other sites
I have yet to come across this problem myself so I can't test it. Let's assume the error msg is genuine and add this line at the beginning of seo.class.php:

 

ini_set("memory_limit","xxM");

 

Replace xx with a number that may fix the problem, hopefully.

 

Ken

 

Hi Ken,

 

Yep! That did the trick! changed xx to 25 (20 did not work) and added it to seo.class.php

 

Thank you very much!

Eric :lol: :lol: :lol:

Share this post


Link to post
Share on other sites

I've just installed Ultimate Urls and found that the links from products pages no longer works....

 

its the bit at the bottom of the product that says

"For more information, please visit this products webpage"

 

the link used to be formatted something like -

http://myshop.co.uk/shop/redirect.php?acti...%2Fproducts.htm

 

now it appears as

http://myshop.co.uk/shop/redirect.php/acti...%2Fproducts.htm

 

many thanks

Share this post


Link to post
Share on other sites
I'm getting this same problem. I believe it is to do with the combination of the SEO changes and the sort that is allowed on the product_listing.php page. I have also installed the All Products contribution (http://www.oscommerce.com/community/contributions,1501/) and that page has exactly the same coding for buy it now button and it works fine. There is, however, no sort allowed on the list.

 

Does anyone have any idea how to fix this (other than to remove the sort option)?

 

Thanks

 

OK I've found the solution to my problem - actaully in this thread at about page 50 !!!

 

see here

 

maybe that will help you, oscleaner?

 

Judy

Share this post


Link to post
Share on other sites

Hi folks :thumbsup:

 

I just installed SEO url's 2.1d on an osCommerce 2.2 with PHP5 and MySql 2.3.

 

As already mentioned in this thread the ?osCid= crap was removed from the URL's bij setting force cookies to "true" but when I use a buy now button I get a page telling me that I need to adjust the security settings of my browser (IE) to medium.

 

But the thing is it's already in that mode. I also don't want my customers to have to fiddle with their settings before they are able to place an order.

 

Is there a solution for this problem? To get the cleanest URL's with force cookies to "false"? Or another way to work arround this?

 

Many thanks!

Edited by Hugoo

Share this post


Link to post
Share on other sites

*sigh* I surfed through a bunch of pages and couldn't find what I did wrong.

All of the links on the main page look like http://localhost/catalog/-c-2.html?osCsid=.......... but they give 404 page not found errors.

I saw several people with the same problem, and maybe I skiped the answer... but what did I do wrong? and how do I fix it!? (small words please! :P I'm brand new to osc, and a newbie to php :blush: )

Sorry if this has already been explained, I couldn't find it.

Thanks for your help!

Jason

Share this post


Link to post
Share on other sites

can't edit...

I've triple checked everything, used both xampp and xamplite, switched PHP versions (site wouldn't even come up in PHP 4... the apache server dies), tried editing the httpd.conf file, the .htaccess file... what am I missing?

Also, this isn't a clean osc instal, I've muddled with some of the stuff... does the SEO have to be the #1 thing you have to do? and if so, ist here a *list* of stuff that I will (probably) have to do before I can do other things? ...like designing the site... <_<

ANY help would be appreciated!

Thanks!

Jason

Share this post


Link to post
Share on other sites

Look in the .htacces file an check if your shopdirectory is put in correctly.

 

Make sure it says /catalog/ even if the .htacces file is in the catalog folder.

I had the same problem and this did the trick for me :thumbsup:

Edited by Hugoo

Share this post


Link to post
Share on other sites

the local server is set up with htdocs as the root, and my catalog is in a sub-folder called catalog. Thus the site would be at http://localhost/catalog

Here is what I added to the .htaccess file in the catalog folder:

 

# Ultimate SEO URLs BEGIN
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}
# Ultimate SEO URLs END

 

Did I do it correctly?

Thanks a ton!

Jason

Edited by JasonT

Share this post


Link to post
Share on other sites
the local server is set up with htdocs as the root, and my catalog is in a sub-folder called catalog. Thus the site would be at http://localhost/catalog

Here is what I added to the .htaccess file in the catalog folder:

 

# Ultimate SEO URLs BEGIN
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}
# Ultimate SEO URLs END

 

Did I do it correctly?

Thanks a ton!

Jason

Jason,

 

If you set up "catalog" in the htdocs folder, apache could see "catalog" as the root directory. You could try:

 

# Ultimate SEO URLs BEGIN
Options +FollowSymLinks
RewriteEngine On 
RewriteBase /

 

I don't know why, but I was never able to get XAMPP to allow rewrites on my local install. That doesn't mean you won't get it going on your computer, but it is one possibility.

 

There have been many who "helpfully" tell me what needs to be done, but it isn't in how I have apache configured, or where my htaccess file is. It is something to do with my computer. When I put the files on my website, everything works just fine.

 

So while it is annoying, I choose to focus on things that will get my site ready to go live. I just leave this contribution disabled on my local install.

 

One belief I see in this thread, that just won't go away, is that somehow having a perfect URL is going to help you with the search engines. People stress out over the session id appended on the url, they want to get rid of the category ids and the product ids, and so on.

 

It just isn't that important. Search engines can and do index dynamic pages. If you really want good SERP positions, work on your content. A great URL will never make up for a lack of relevant information on the page. That means your product description is really important. And if you don't need a specific box in the left or right column, remove it. The less unnecessary content on the page, the better.

 

Okay. This thread isn't about SEO. And I don't want to get off topic here. My point is there are so many factors used by the search engines, to determine a page's relevancy to any given search query, that it is not in your best interest to get hung up on any one thing. Including what the URL looks like.

 

Good luck with getting this working on your local computer. I do hope you have better luck than I did. If not, set it, forget it and move on to the next task. You have a lot of work ahead of you before you go live. Don't sabotage yourself getting hung up on unimportant details.

 

-Skittles

Share this post


Link to post
Share on other sites
One belief I see in this thread, that just won't go away, is that somehow having a perfect URL is going to help you with the search engines. People stress out over the session id appended on the url, they want to get rid of the category ids and the product ids, and so on.

 

It just isn't that important.

 

-Skittles

 

Here here! Good advice. Remember that the search engines really want relevant CONTENT. So a site and product description that feeds them the right keywords IN CONTEXT & ON THE PAGE is MUCH more important. The rest is just lubing the SEO gears.

 

Iggy


Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites

For months I've been using version Ultimate SEO URLs v2.1c with out any issues. I have made updates to this version

from the discussion on this thread also without any issues.

 

The following settings have been working for months without any issues

The shop was installed in the catalog directory.

 

My .htaccess is as follow

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

 

# Ultimate SEO URLs BEGIN

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}

# Ultimate SEO URLs END

 

My httpd.conf has this part of code that is related to .htaccess

# use .htaccess files for overriding,

AccessFileName .htaccess

<Directory "/srv/www/htdocs/catalog">

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:

# Options FileInfo AuthConfig Limit

#

AllowOverride All

</Directory>

 

The following are setting in admin for SEO URLs

Enable SEO URLs? True

Add cPath to product URLs? False

Add category parent to begining of URLs? True

Filter Short Words 0

Output W3C valid URLs (parameter string)? False

Enable SEO cache to save queries? True

Enable product cache? True

Enable categories cache? True

Enable manufacturers cache? True

Enable articles cache? True

Enable topics cache? True

Enable information cache? True

Enable automatic redirects? True

Choose URL Rewrite Type Rewrite

Enter special character conversions

Remove all non-alphanumeric characters? False

Reset SEO URLs Cache False

Other Admin settings:

Use Search-Engine Safe URLs (still in development) False

Other files that are important:

/catalog/includes/configuration.php Has all the correct paths and settings

/catalog/admin/includes/configuration.php Has all the correct paths and settings

Again, all the settings I have listed above have been working for me without any issues for months.

 

Now, here is the issue:

I have moved the shop from catalog to my web root directory htdocs (full path /srv/www/htdocs) and every page that does NOT get the rewrite rule is O.K. for example index.php, shopping_cart.php, contact_us.php..ect are O.K but when I click on a product I get a "Object Not Found Error 404". All the products that I hover over have the correct rewrite rule but when I click on any product I get "Object Not Found Error 404"

Here are the same settings as I listed above with the changes now for the root directory htdocs.

 

The differences are in bold

 

My .htaccess is as follow

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

 

# Ultimate SEO URLs BEGIN

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}

# Ultimate SEO URLs END

 

My httpd.conf has this part of code that is related to .htaccess

# use .htaccess files for overriding,

AccessFileName .htaccess

<Directory "/srv/www/htdocs">

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:

# Options FileInfo AuthConfig Limit

#

AllowOverride All

</Directory>

 

The following are setting in admin for SEO URLs

Enable SEO URLs? True

Add cPath to product URLs? False

Add category parent to begining of URLs? True

Filter Short Words 0

Output W3C valid URLs (parameter string)? False

Enable SEO cache to save queries? False (I change this to False while I'm debuging this issue)

Enable product cache? True

Enable categories cache? True

Enable manufacturers cache? True

Enable articles cache? True

Enable topics cache? True

Enable information cache? True

Enable automatic redirects? True (Note: It's been discussed in the form that this setting should be False but it has made no difference in my case if its True or False)

Choose URL Rewrite Type Rewrite

Enter special character conversions

Remove all non-alphanumeric characters? False

Reset SEO URLs Cache False

Other Admin settings:

Use Search-Engine Safe URLs (still in development) False

Other files that are important:

/catalog/includes/configuration.php Has all the correct paths and settings to match the new root directory htdocs

/catalog/admin/includes/configuration.php Has all the correct paths and settings match the new root directory htdocs

 

From the testing that I've done it looks like for some reason the .htaccess is NOT being read. I have set Enable SEO URLs? to False and everything is working again without any problems.

 

Other debug tests the I have tried

 

1. Checked that .htaccess has the correct permission

2. Everytime I make a change to httpd.conf I re-start the server to make sure the change takes effect

3. mod_rewrite is enabled on the server

 

I've seen previous posts having similar issue to the one I have and it seem that the problem most of the time was related to an error in .htaccess. For example not having the correct path set for RewriteBase. But I check and double checked that paths and they all look correct to me.

 

Summary:

  • Everything was working fine for months when the shop was in the directory catalog example( /srv/www/htdocs/catalog)

  • I have moved the shop to the root directory htdocs (/srv/www/htdocs) and all pages that don't have rewrite rules applied are O.K but when I click on any of the products I get "Object Not Found Error 404"

Server Specs:

Server OS:Linux 2.6.18.2-34-default

Database:MySQL 5.0.26

HTTP Server:Apache

PHP Version:5.2.0 (Zend: 2.2.0)

Server API:Apache 2.0 Handler

I thought this would be a simple change but it has turned into a project. I've been working on this issue for a few days now and I'm running out of ideas.

I'm just out of ideas as to why the rewrites dont work on my htdocs root directory.

 

I need some assistace, please. Regards -Marizka

Share this post


Link to post
Share on other sites

Some help if possible: this is U-seo related

 

I use U SEO 2.1d which works perfectly.

I have information pages unlimited (IPU) 1.2 which works great and U-seo works perfectly with.

My issue is I have installed Chemos sitemap_1_2_3_4 which you can see here and it is working fine except when looking at the links for the IPU pages, the preview links are not showing thru as the same u-seo links in the information box...

 

when hovering over a IPU Link, links are showing as (example)

http://www.pavepatch.com/information.php?info_id=17

but landing (correctly) at

http://www.pavepatch.com/step-step-guide-i-17.html (I assume the re-write is doing that as it should)

 

How can I make the sitemap links U-seo links like the info box links when hovering, or is this just not possible and the rewrite has to do its job? any advice appreciated

 

The sitemap code I'm staring at is

// Information Pages Unlimited BEGIN
 $information_query=mysql_query('SELECT information_id, languages_id, info_title FROM ' . TABLE_INFORMATION .' WHERE visible=\'1\' and languages_id ='.$languages_id.' ORDER BY v_order')
or die(mysql_error());

while ($page = tep_db_fetch_array($information_query)) {
 $rows++;

 if($page['info_title'] != 'Contact Us'){
$link = FILENAME_INFORMATION . '?info_id=' . $page['information_id'];
 }else{
$link = FILENAME_CONTACT_US;
 }

 echo '<li><a href="' . tep_href_link($link) . '">' . $page['info_title'] . '</a></li>';
}
// Information Pages Unlimited END


-Dave

Share this post


Link to post
Share on other sites

Hello,

I have install the ultimate seo url v21d and it work nice but I have got a problem with products_new.php.

A demonstration is better than words,

If the url is : http://www.vosbijoux.fr/products_new.php/page/2 I have an error in the bottom but

 

If the url is : http://www.vosbijoux.fr/products_new.php?page=2 evrything be good.

 

Can you help me to resolve this problem, because i don't know where i can configure it

 

Thanks you for your help :rolleyes:

Share this post


Link to post
Share on other sites
For months I've been using version Ultimate SEO URLs v2.1c with out any issues. I have made updates to this version

from the discussion on this thread also without any issues.

 

The following settings have been working for months without any issues

The shop was installed in the catalog directory.

 

My .htaccess is as follow

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

 

# Ultimate SEO URLs BEGIN

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}

# Ultimate SEO URLs END

 

My httpd.conf has this part of code that is related to .htaccess

# use .htaccess files for overriding,

AccessFileName .htaccess

<Directory "/srv/www/htdocs/catalog">

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:

# Options FileInfo AuthConfig Limit

#

AllowOverride All

</Directory>

 

The following are setting in admin for SEO URLs

Enable SEO URLs? True

Add cPath to product URLs? False

Add category parent to begining of URLs? True

Filter Short Words 0

Output W3C valid URLs (parameter string)? False

Enable SEO cache to save queries? True

Enable product cache? True

Enable categories cache? True

Enable manufacturers cache? True

Enable articles cache? True

Enable topics cache? True

Enable information cache? True

Enable automatic redirects? True

Choose URL Rewrite Type Rewrite

Enter special character conversions

Remove all non-alphanumeric characters? False

Reset SEO URLs Cache False

Other Admin settings:

Use Search-Engine Safe URLs (still in development) False

Other files that are important:

/catalog/includes/configuration.php Has all the correct paths and settings

/catalog/admin/includes/configuration.php Has all the correct paths and settings

Again, all the settings I have listed above have been working for me without any issues for months.

 

Now, here is the issue:

I have moved the shop from catalog to my web root directory htdocs (full path /srv/www/htdocs) and every page that does NOT get the rewrite rule is O.K. for example index.php, shopping_cart.php, contact_us.php..ect are O.K but when I click on a product I get a "Object Not Found Error 404". All the products that I hover over have the correct rewrite rule but when I click on any product I get "Object Not Found Error 404"

Here are the same settings as I listed above with the changes now for the root directory htdocs.

 

The differences are in bold

 

My .htaccess is as follow

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

 

# Ultimate SEO URLs BEGIN

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}

# Ultimate SEO URLs END

 

My httpd.conf has this part of code that is related to .htaccess

# use .htaccess files for overriding,

AccessFileName .htaccess

<Directory "/srv/www/htdocs">

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:

# Options FileInfo AuthConfig Limit

#

AllowOverride All

</Directory>

 

The following are setting in admin for SEO URLs

Enable SEO URLs? True

Add cPath to product URLs? False

Add category parent to begining of URLs? True

Filter Short Words 0

Output W3C valid URLs (parameter string)? False

Enable SEO cache to save queries? False (I change this to False while I'm debuging this issue)

Enable product cache? True

Enable categories cache? True

Enable manufacturers cache? True

Enable articles cache? True

Enable topics cache? True

Enable information cache? True

Enable automatic redirects? True (Note: It's been discussed in the form that this setting should be False but it has made no difference in my case if its True or False)

Choose URL Rewrite Type Rewrite

Enter special character conversions

Remove all non-alphanumeric characters? False

Reset SEO URLs Cache False

Other Admin settings:

Use Search-Engine Safe URLs (still in development) False

Other files that are important:

/catalog/includes/configuration.php Has all the correct paths and settings to match the new root directory htdocs

/catalog/admin/includes/configuration.php Has all the correct paths and settings match the new root directory htdocs

 

From the testing that I've done it looks like for some reason the .htaccess is NOT being read. I have set Enable SEO URLs? to False and everything is working again without any problems.

 

Other debug tests the I have tried

 

1. Checked that .htaccess has the correct permission

2. Everytime I make a change to httpd.conf I re-start the server to make sure the change takes effect

3. mod_rewrite is enabled on the server

 

I've seen previous posts having similar issue to the one I have and it seem that the problem most of the time was related to an error in .htaccess. For example not having the correct path set for RewriteBase. But I check and double checked that paths and they all look correct to me.

 

Summary:

  • Everything was working fine for months when the shop was in the directory catalog example( /srv/www/htdocs/catalog)

  • I have moved the shop to the root directory htdocs (/srv/www/htdocs) and all pages that don't have rewrite rules applied are O.K but when I click on any of the products I get "Object Not Found Error 404"

Server Specs:

Server OS:Linux 2.6.18.2-34-default

Database:MySQL 5.0.26

HTTP Server:Apache

PHP Version:5.2.0 (Zend: 2.2.0)

Server API:Apache 2.0 Handler

I thought this would be a simple change but it has turned into a project. I've been working on this issue for a few days now and I'm running out of ideas.

I'm just out of ideas as to why the rewrites dont work on my htdocs root directory.

 

I need some assistace, please. Regards -Marizka

I tried moving the rewrite rules to httpd.conf as follows and this works.

# use .htaccess files for overriding,

AccessFileName .htaccess

<Directory "/srv/www/htdocs/catalog">

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:

# Options FileInfo AuthConfig Limit

#

AllowOverride All

# Ultimate SEO URLs BEGIN

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}

# Ultimate SEO URLs END

</Directory>

 

Then I tired the same thing but change the paths to my root directory (/srv/www/htdocs) and I get

Error Access Denied.

# use .htaccess files for overriding,

AccessFileName .htaccess

<Directory "/srv/www/htdocs">

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:

# Options FileInfo AuthConfig Limit

#

AllowOverride All

# Ultimate SEO URLs BEGIN

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}

# Ultimate SEO URLs END

</Directory>

 

I started commenting code to see what was causing the Access Denied Error

and when I commented out #RewriteEngine On the site came back up but still the write rules did not seem to work because with I would click on a product then I would get "Object Not Found Error 404". So, commenting out RewriteEngine On is not a good idea, look like that code enables the rewriteEngine.

 

When I do this testing all my files that are in catalog have been transferred to from /srv/www/htdocs/catalog to /srv/www/htdocs. What I want to accomplish is instead of a URL of http://www.site/catalog I want http://www.site.com. Now http://www.site.com works fine only when I disable SEO in admin

 

It's still a mystery to me why my rewrite rules don’t work on my root directory.

Can anybody see what I'm over looking? Anybody have and ideas on what's wrong?

Thank you. Regards –Marizka

Share this post


Link to post
Share on other sites

Forgot to mention that when I moved my rewrite rules to httpd.conf, I renamed the .htaccess to a.htaccess so there would not be any conficts between httpd.conf and .htaccess having identical rewrite rules, then restated the sever for the changed to take effect.

From reading the Apache Tutorial on .htaccess is where I got some of these ideas to try http://httpd.apache.org/docs/2.2/howto/htaccess.html

 

 

 

Here are a few other things that I tried.

 

 

 

This code is in my httpd.conf NOTE: This is the only change AllowOverride None

 

This code works only when the shop is in the catalog folder.

# use .htaccess files for overriding,

AccessFileName .htaccess

<Directory "/srv/www/htdocs/catalog">

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:

# Options FileInfo AuthConfig Limit

#

AllowOverride None

# Ultimate SEO URLs BEGIN

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}

# Ultimate SEO URLs END

</Directory>

 

Then I change the code to this and it does NOT work. I get the same error that I mentioned before

# use .htaccess files for overriding,

AccessFileName .htaccess

<Directory "/srv/www/htdocs">

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:

# Options FileInfo AuthConfig Limit

#

AllowOverride None

# Ultimate SEO URLs BEGIN

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}

# Ultimate SEO URLs END

</Directory>

Any other ideas? Thank you -Regards Marizka

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites
I've just installed Ultimate Urls and found that the links from products pages no longer works....

 

its the bit at the bottom of the product that says

"For more information, please visit this products webpage"

 

the link used to be formatted something like -

http://myshop.co.uk/shop/redirect.php?acti...%2Fproducts.htm

 

now it appears as

http://myshop.co.uk/shop/redirect.php/acti...%2Fproducts.htm

 

many thanks

 

Still not found any solution for this, I havn't seen anyone else poit it out so guess its something really simple I'm doing wrong, any help much appreciated.

Share this post


Link to post
Share on other sites

would love to use this mod, but am having problems any help would be good,

when i click a link i just get a page not displayed error

 

http://82.35.139.1/new/index.php

http://82.35.139.1/new/hardware-c-1.html

 

this is a clean version of osc and seourl's

 

oscommerce-2.2ms2-060817

Ultimate_SEO_URLsv21da

 

followed all install instructions, please help

 

cheers

Danny

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

×