Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

Hi there, I have SEO urls

 

http://www.josephabrams.com/kiporkge1000ti...rator-p-36.html

 

I would like them to show like this if possible, I am not so much worried about the -p-, -c- etc, unless it can be done. Anyhow, is there a way to make them look like this

 

http://www.josephabrams.com/kipor-kge1000t...rator-p-36.html

 

I was told i can do it via my httacess file but i cant figure out how, i deleted the -p- etc but they still come up, and i could not see a place to put a - for in between the names.

 

This is my httacess file, any thoughts?

 

Options +FollowSymLinks

<FilesMatch "\.(inc|tpl|h|ihtml|sql|ini|conf|class|bin|spd|theme|module|exe)$">
deny from all
</FilesMatch>

ErrorDocument 404 /errorpage.php

RewriteEngine On 
RewriteBase /

RewriteCond %{HTTP_HOST} ^josephabrams\.com [NC]
RewriteRule (.*) http://www.josephabrams.com/$1 [L,R=301]


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}

Edited by tec
Link to comment
Share on other sites

Dear fellow users of this great contribution!

 

I experience difficulties to get it to work, maybe because of step 6. I do not know if i did it correctly, but I uploaded a htaccess.txt containing the second of the 2 codes into the catalog folder. Once on the file has been uploaded on the server I renamed it to .htaccess.

 

When I try to load the shop, in first instance I get a rewritten URL (great) but completed with an session ID (not so great).

 

Like this:

http://shop.modelbrouwers.nl/catalog/bare-...13974666225448b

 

When I click some more, this Session ID's disappear (great looking URLs) but now I get 404's.

 

Do you have a clou on what I do wrong? Thanks a lot!!!

 

Best regards,

Hanjo

Link to comment
Share on other sites

Dear fellow users of this great contribution!

 

I experience difficulties to get it to work, maybe because of step 6. I do not know if i did it correctly, but I uploaded a htaccess.txt containing the second of the 2 codes into the catalog folder. Once on the file has been uploaded on the server I renamed it to .htaccess.

 

When I try to load the shop, in first instance I get a rewritten URL (great) but completed with an session ID (not so great).

 

Like this:

http://shop.modelbrouwers.nl/catalog/bare-...13974666225448b

 

When I click some more, this Session ID's disappear (great looking URLs) but now I get 404's.

 

Do you have a clou on what I do wrong? Thanks a lot!!!

 

Best regards,

Hanjo

 

Hello Hanjo,

 

Looks like you are using the wrong .htaccess example.

 

The second one is for if you have a root install (shop.modelbrouwers.nl).

 

Your install uses the catalog directory (shop.modelbrouwers.nl/catalog/) , so you need the first example, and you need to change:

 

RewriteBase /directory/

 

To:

 

RewriteBase /catalog/

 

Hope that helps some.

 

Regards,

 

Carlos

Link to comment
Share on other sites

I have site links broken after Ultimate SEO URLs v2.2 installation.

 

They are renamed normally+session symbols added (I don't know why). Example:

http://www.mysite.com/catalog/good-name.ht...1013dae457319de

 

On this address the following message appear:

 

"Not Found

The requested URL /catalog/good-name.html was not found on this server."

 

mod_rewrite is on.

Rewrite Base in .htaccess set to /catalog/ since the oscommerce site is placed there, not in the root.

 

How to solve the problem with broken links?

 

Thanks!

 

P.S. Is it normal that internal links on the page stay bad (index.php?CPath=...) and are being renamed only after clicking them?

Edited by pyatachok
Link to comment
Share on other sites

I have site links broken after Ultimate SEO URLs v2.2 installation.

 

They are renamed normally+session symbols added (I don't know why). Example:

http://www.mysite.com/catalog/good-name.ht...1013dae457319de

 

On this address the following message appear:

 

"Not Found

The requested URL /catalog/good-name.html was not found on this server."

 

mod_rewrite is on.

Rewrite Base in .htaccess set to /catalog/ since the oscommerce site is placed there, not in the root.

 

How to solve the problem with broken links?

 

Thanks!

 

P.S. Is it normal that internal links on the page stay bad (index.php?CPath=...) and are being renamed only after clicking them?

 

Hi, I can see one problem with your urls. It does not have c-{category id} or p-{product id}.

 

So your URLs should be something like /catalog/good-name-p-4315.html

Without the product or category number, it definately will not work.

 

Now I haven't used their 2.2 version, but I am currently using Chemo's official 2.1d (the last one added to the Contribs area by myself), and it works fine. So I suggest you try using that one unless you have a specific reason to use one of the other ones.

 

Cheers,

Chris

Link to comment
Share on other sites

Chris,

 

Above (earlier posts) was you guys talking about the issue with the back button in the products discription. Reason Im askin is because all other back buttons woked except for this one. I have no idea as to why but I would like to put the other one back in there instead of the javascript one that I am using now. Also I have the affiliate mod everything is fine until you go to login. Then the page gets all garbled. Any ideas,

 

Thanks,

Eric

Link to comment
Share on other sites

I've got this contrib installed and it works like a dream, However, I've tracked down a problem on my site to it (please note the site is live - www.travelbagsize.com/shop/).

 

After a purchase when you go to checkout_success.php you are offered the check box option for Product Notifications. When you "check" this it does not work. Everything looks ok but the product notification is not updated in the customer account.

 

Any ideas ??

Link to comment
Share on other sites

I am having two issues. Once i don't think has to do with this contrib however I'm going to post it anyways.

 

The first problem is that I'm getting the osCsid for every url. I looked back and did some searching to find that this is probably something wrong with my cookies. I did searches for "cookie fix" "session fix" "osCsid fix" "sid fix" etc, etc. Pretty much everything related I could think of. The only contribs I found were for search engines. This doesn't have anything to do with search engines because it's not when I come to the site from search engines or anything.

 

Anyways, I know that probably doesn't have to do with this contrib probably but I still need help with it.

 

My second problem is that when I enable SEO URLs I get a 404 error and it looks like the urls are linking to catalog/ instead of just the root / I did change servers where on the other server I had the SEO URLs enabled under catalog/ but I'm not really sure what I need to change here. I was thinking it might have something to do with cookies also but I have no idea what to do.

 

PLEASE HELP ME, I'm very close to opening the store and these are really the only two issues that are holding me back. Thank you very much!

Link to comment
Share on other sites

Hi @ll,

 

I already posted my tricky little problem in the general support forum but I guess it would have been better placed here as I think that it is Ultimate SEO that needs to be modified.

 

The problem I'm having is that URLs contain & instead of & after being processed by Ultimate SEO and I would need them to remain & in order to lead to the proper results.

 

I'll not repeat the post. You can find it here: http://www.oscommerce.com/forums/index.php?showtopic=214875

 

Any help with this is much appreciated.

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Link to comment
Share on other sites

Ok, after a bit more research I found the solution in one of the other support forums.

 

The solution is pretty straight forward: in admin panel -> configuration -> SEO URLs -> set Output W3C valig URLs to false.

 

I have no idea what impact this has on my URLs but at least the avsearch contrib is working fine now.

 

Maybe someone can fill me in on what this setting is supposed to do?

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Link to comment
Share on other sites

I am having two issues. Once i don't think has to do with this contrib however I'm going to post it anyways.

 

The first problem is that I'm getting the osCsid for every url. I looked back and did some searching to find that this is probably something wrong with my cookies. I did searches for "cookie fix" "session fix" "osCsid fix" "sid fix" etc, etc. Pretty much everything related I could think of. The only contribs I found were for search engines. This doesn't have anything to do with search engines because it's not when I come to the site from search engines or anything.

 

Anyways, I know that probably doesn't have to do with this contrib probably but I still need help with it.

 

My second problem is that when I enable SEO URLs I get a 404 error and it looks like the urls are linking to catalog/ instead of just the root / I did change servers where on the other server I had the SEO URLs enabled under catalog/ but I'm not really sure what I need to change here. I was thinking it might have something to do with cookies also but I have no idea what to do.

 

PLEASE HELP ME, I'm very close to opening the store and these are really the only two issues that are holding me back. Thank you very much!

 

Hey, the 2nd problem is fixed by going to your .htacess file and change your 'RewriteBase' to just '/' (no quotes) I think.

That should fix the problem.

 

Cheers,

Chris

Link to comment
Share on other sites

I have a problem that’s causing duplicate content.

 

If I browse to a product through the categories it is displayed as:

 

www.mydomain.com/product-nice-item.html

 

But if I browse to a product through the manufacturer pages it is displayed like this:

 

www.mydomain.com/product-nice-item.html?manufacturers_id=13

 

This is causing duplicate content to be indexed by the search engine bots. Also it means that the categories don’t open up.

 

Please help before I get a google penalty. :-(

Edited by Caios
Link to comment
Share on other sites

Hey, the 2nd problem is fixed by going to your .htacess file and change your 'RewriteBase' to just '/' (no quotes) I think.

That should fix the problem.

 

Cheers,

Chris

 

 

Thank you very much, that was exactly what it was :)

Link to comment
Share on other sites

Does anybody have a problem to have the rewrite engine on working on StartLogic virtual hosting servers?

 

I have several sites runing SEO just fine on other hosting companies, but Startlogic goes 404 on that one when the url is rewritten: can't find the HTML page :-) of course, there is nothing to find :-)

The tech guyes there are positive that the rewrite engine is on. They have no idea of what SEO url is doing and don't understand what I want :-)

 

Thank you for sharing your experiences with that host. Is there a setting on my end that I missed?

Link to comment
Share on other sites

Anyone getting this Error rom the latest version 2.2.2 package? Is there a fix?

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ...... path \catalog\includes\classes seo.class.php on line 115

 

The line is:

 

function FetchArray($resource_id, $type = MYSQL_BOTH) {

return mysql_fetch_array($resource_id, $type); <-- LINE 115 ERROR

} # end function

 

My previous version 2.1c did not throw this error and that line looked like this:

 

return @mysql_fetch_array($resource_id, $type); ... it had an @ symbol before mysql

 

I tried putting it in the new version but still same error.

 

I have read in other forums that this is a php glitch and that you do need the @ symbol before such statements as mysql_fetch_array(

 

I have went through everything and it will not go away. I even replaced all the files that were changed with the originals. It screws up my whole left column with the warning message.

Link to comment
Share on other sites

One new problemon my localhost server.

 

My category paths look like below because I have a product sort order mod.

 

Now when I click on any category in the category box listing it takes me to the proper category:

 

http://localhost/catalog/index.php?cPath=8...e=1&sort=1d

 

** forum will not take urls correctly. the above ending should look like below from &page on ....

 

 

The problem is only if I click on the TOP Category I get this url:

 

http://localhost/catalog/-c-1_4.html&page=1&sort=1d

 

This url throws a 404 Page .... but if I take the &page=1&sort=1d off of the end and resubmit the url ... Bang! it works as normal.

 

 

Any ideas? There must be several if not hundreds of osc users that have some sort of product sorting mod ... there are at least 3 that I know of and they are all very similar.

Edited by insomniac2
Link to comment
Share on other sites

Hello,

 

I'm trying to install Ultimate SEO URLs 2.2.1 on my osCommerce 2.2 MS2 installation (running on Apache 1.3.34 (Unix) with PHP 4.4.2).

 

After following the installation instructions carefully I try accessing my shopping cart and get an "Internal Server Error (500)" and my error log reports "/home/lisa/public_html/cadcart/.htaccess: Illegal option RewriteEngine". I contacted my host and they assure me that the server is capable of mod_rewrite. I found that if I comment out the "Options +FollowSymLinks" line of the .htaccess file of cart directory that problem goes away. Not knowing too much about .htaccess files I'd like to know if the FollowSymlinks line is mandatory ? What if I put it in the .htaccess file of my root instead ? Any idea why I get this error ?

 

Once I comment out that line I am able to access the front page of my store, but then going to a product or category (I can see the URL being rewriten) but I get a 404 since the page doesn't exist... I believe I have seen this documented somewhere else but haven't seen a clear answer to the problem, so if someone woudn't mind too much pointing me in the right deirection :D

Link to comment
Share on other sites

I should also mention:

 

The RewriteBase line of the .htaccess is properly set to my cart directory.

 

The "Use Search-Engine Safe URLs (still in development)" option of osCommerce is disabled.

Edited by cinolas
Link to comment
Share on other sites

I need to ask him about ?manufacturers_id=13 on the end of product URLs when browsing from manufacturer pages. Its causeing duplicate content in the search engines which we could get a penalty for. I think it'd be any easy fix for some one who knows the code well.

Link to comment
Share on other sites

Have just installed this great contribtion but am having a problem..

 

If you take a look at my site: here

 

You'll see that you can browse products, and add them to the cart. However as soon as you try and add a product - it shows that the cart is empty. I think the session ID changes as well..

 

I've had a dig around and have narrowed it down to the tep_href_link() function in html_output.php

 

Any idea why this would be causing me problems?

 

Cheers

 

Mike

my sites:

----------

www.preciousmetal-online.co.uk

www.liparazzi.com

www.yaoh.co.uk

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