Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

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

MYSTERY SOLVED!

For my configuration, when Apache Ver2 Server starts up, it pulls many configuration files. These 2 specific ones (httpd.conf and default-server.conf) were the ones that were giving me trouble. The issue was that I was supposed to make my edits to default-server.conf NOT httpd.conf. When I restarted the server, httpd.conf would be executed, then a few lines of code further down in httpd.conf it would include default-server.conf. So, I was setting AllowOverride all in httpd.conf but then when default-server.conf was included it would set it back to default value of AllowOverride None, so my .htaccess never worked.

Now, I did my edits to default-server.conf and everything is working as expected.

-Marizka

Link to comment
Share on other sites

Hi gang,

 

I'm running a fairly new store, with STS 4.3.2 and HTC 2.6. I've just installed Ultimate SEO Urls and I am getting the most unusual behaviors.

 

Whith SEO Urls enabled, any click sends my pages to index.php.

Here's the url I get: https://mydomain.com/catalog/index.php?catalog=index.php

 

If I try to go to a product, using something like the new products window, I get this: https://mydomain.com/catalog/product_info.p...roduct_info.php

and a big product not found message.

 

Also, in the admin section, on the seo url's config screen, I get this right above the configuration options:

 

Warning: call_user_func(tep_reset_cache_data_seo_urls) [function.call-user-func]: First argument is expected to be a valid callback in /homepages/40/d185342331/htdocs/catalog/admin/includes/functions/general.php on line 1195

 

Any suggestions?

 

Thanks!

Link to comment
Share on other sites

Hello All,

Does anyone know the reason why (having installed version 2.1d) that no internal product links are working on my site (400 error).

My Admin directory has a .htaccess file in it but my Admin directory is not inside the catalog directory, so I have uploaded the .htaccess to my catalog directory. Could that be the problem?

I read the comments in the .htaccess about configuring Apache. When I stopped crying, I decided to ignore the advice to mess with something else I don't understand in case I broke that as well.

Any advice, patronising or otherwise, much appreciated.

Thanks,

Paul

Link to comment
Share on other sites

I wonder if you could help me with a few small difficulties.

A couple quick questions:

 

1: I have installed this contribution out of order (according to Chemo's html install guide). I accidentally skipped step 1. Will it still work? (I haven't finished just yet) Should I run the sql's again? Is there a harm in running them again?

 

2: There are two sets of install instructions -- one really simple text doc, and one more complex html file (which references the additional instructions text file). Which should I follow?

 

Thank you in advance for your help!

Link to comment
Share on other sites

HTML links working but not accurate

 

Hi,

 

I have just installed the contribution and everything appears to be working well except some links don't seem to have the desired output. The urls definitley have been shortened and are ending in html but the naming isnt exactly what I expected:

 

For a category called 'Bathroom Accessories': http://www.inmyimagination.com.au/-c-42.html

For a category called 'Room Decor': http://www.inmyimagination.com.au/-c-27.html

 

Does anyone know why I am getting these urls instead of the actual name??

 

The contribution is working well for individual products however: http://www.inmyimagination.com.au/bath-puz...ring-p-261.html

 

Although even that link does have a few odd letters and numbers at the end of it. Can anyone suggest something I may have done wrong or missed. If anything I think the problem would stem from the admin/categories.php file as this took me a long time to edit due to other contribution I have installed inluding the Header Tags cont.

 

Any ideas???

 

Thanks in advance.

Link to comment
Share on other sites

I have a major problem. In trying to configure this contrib, and following the many helpful topics on this forum, something horrible has happened. I am in my administration page, it happens to be the Who's Online page. When I try to go to ANY other page, I get a "The page cannot be displayed" page. HELP! I have no idea what happened. I can't leave this who's online page to go anywhere. I refresh and nothing happens. I also haven't gotten the SEO configuration on my Admin pages either...but I'll worry about that later.

 

I am really stuck and can't find the problem...

 

Marcia

Link to comment
Share on other sites

...For a category called 'Bathroom Accessories': http://www.inmyimagination.com.au/-c-42.html

For a category called 'Room Decor': http://www.inmyimagination.com.au/-c-27.html

...

 

Have you tried the Fixed seo.class.php on the seo urls contrib download page? That one seems to address this particular issue.

 

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.

Link to comment
Share on other sites

Have you tried the Fixed seo.class.php on the seo urls contrib download page? That one seems to address this particular issue.

 

Ken

 

Thanks Ken that worked. This is what I get now:

 

http://www.inmyimagination.com.au/bathroom...ories-c-42.html

 

There is still a letter and two numbers at the end of these url's though. Is this normal? nothing to worry about?

 

Cheers.

Link to comment
Share on other sites

Hi,

 

Im wanting to know if anyone can give me some advice on Search Engine Optimisation. I have now installed the Header Tags contribution and the SEO URLs contribution. Can anyone tell me what more I can do to improve the search rankings of my site?

 

Thanks.

Link to comment
Share on other sites

Normal. (to mackieco's question RE a letter and two numbers at the end of these url's )

 

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.

Link to comment
Share on other sites

Hi,

 

Im wanting to know if anyone can give me some advice on Search Engine Optimisation. I have now installed the Header Tags contribution and the SEO URLs contribution. Can anyone tell me what more I can do to improve the search rankings of my site?

 

Thanks.

mackieco,

 

There is an entire forum dedicated to marketing your osCommerce site: osCommerce Community Support Forums > General Topics > Next Steps / Marketing. Browse through the topics and you're sure to find some useful information.

 

-Skittles

Link to comment
Share on other sites

Hello All,

Does anyone know the reason why (having installed Ultimate SEO version 2.1d) that no internal product links are working on my site (400 error). Then, when I disable SEOs in my admin control panel, all's well again?

My Admin directory has a .htaccess file in it but my Admin directory is not inside the catalog directory, so I have uploaded the .htaccess that came with the Ultimate SEO install to my catalog directory. Could that be the problem?

I read the comments in the .htaccess about configuring Apache. When I stopped crying, I decided to ignore the advice to mess with something else I don't understand in case I broke that as well.

Any advice, patronising or otherwise, much appreciated.

Thanks,

Paul

Link to comment
Share on other sites

Hello All,

Does anyone know the reason why (having installed Ultimate SEO version 2.1d) that no internal product links are working on my site (400 error). Then, when I disable SEOs in my admin control panel, all's well again?

My Admin directory has a .htaccess file in it but my Admin directory is not inside the catalog directory, so I have uploaded the .htaccess that came with the Ultimate SEO install to my catalog directory. Could that be the problem?

I read the comments in the .htaccess about configuring Apache. When I stopped crying, I decided to ignore the advice to mess with something else I don't understand in case I broke that as well.

Any advice, patronising or otherwise, much appreciated.

Thanks,

Paul

Link to comment
Share on other sites

Hello All,

Does anyone know the reason why (having installed Ultimate SEO version 2.1d) that no internal product links are working on my site (400 error). Then, when I disable SEOs in my admin control panel, all's well again?

My Admin directory has a .htaccess file in it but my Admin directory is not inside the catalog directory, so I have uploaded the .htaccess that came with the Ultimate SEO install to my catalog directory. Could that be the problem?

I read the comments in the .htaccess about configuring Apache. When I stopped crying, I decided to ignore the advice to mess with something else I don't understand in case I broke that as well.

Any advice, patronising or otherwise, much appreciated.

Thanks,

Paul

 

In the .htaccess file (no, not in the admin), did you change the /directory/ part (third line) to be your directory location? For example, if you have your osCommerce installed in the /catalog directory, then you should have the following added to your .htaccess:

 

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}

Link to comment
Share on other sites

In the .htaccess file (no, not in the admin), did you change the /directory/ part (third line) to be your directory location? For example, if you have your osCommerce installed in the /catalog directory, then you should have the following added to your .htaccess:

 

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}

 

When I began installing this contribution I was unaware of there being any .htaccess file in my catalog directory.

All I did was upload the .htaccess from the contribution into my catalog directory, and, as you point out, that is the directory the rewrite is performed on. However, there are 2 things that concern me:

1) my admin directory does not live inside my catalog directory but co-exists in the same root. So any paths using eg. catalog/admin/file_to_use.php wouldn't work.

2) I have never entered any URLs in the 'search engine friendly URL' field when adding any products, and now a new field has appeared requesting an SEO URL. Surely, I need to populate this field. Because not doing so must be causing some sort of problem with the contribution?

Any advice on the above much appreciated

Thanks again,

Paul

Link to comment
Share on other sites

I am using Information Pages Unlimited v2.03 with Ultimate SEO URLs - 2.1d. It broke the urls for information.php. They all show up as /-i-1.html

 

The entry in .htaccess is

 

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

 

does anyone know how to correct the urls?

 

 

Thanks in Advance

 

Raj

Link to comment
Share on other sites

hello, i have this problem with my install, im not good with php and not sure why.

 

i tried you fix but i still get no page.

 

Manufacturers list, still has the url as.

 

http://www.url.com/store/Manufacturer/ this just goes to no page?

 

 

any help would be great

 

tthanks again

 

I had a problem with SEO enabled whereby, having viewed a manufacturers products using the manufacturers drop down in the manufacturers infobox and then choosing the 'Please select' in the dropdown, a page not found error would occur. The fix appears below:

 

Cheers - moosey_jude

 

 

In file catalog/includes/classes/seo.class.php

 

Find (about line 820-830 depending on other fixes applied):

 

case 'manufacturers_id':

switch(true){

case ($page == FILENAME_DEFAULT && !$this->is_cPath_string($params) && !$this->is_product_string($params) ):

 

and change to:

 

case 'manufacturers_id':

switch(true){

case ($page == FILENAME_DEFAULT && !$this->is_cPath_string($params) && !$this->is_product_string($params) && strlen($this->get_manufacturer_name($p2[1]))>0 ) :

Link to comment
Share on other sites

hello, i have this problem with my install, im not good with php and not sure why.

 

i tried you fix but i still get no page.

 

Manufacturers list, still has the url as.

 

http://www.url.com/store/Manufacturer/ this just goes to no page?

 

 

any help would be great

 

tthanks again

 

I had a problem with SEO enabled whereby, having viewed a manufacturers products using the manufacturers drop down in the manufacturers infobox and then choosing the 'Please select' in the dropdown, a page not found error would occur. The fix appears below:

 

Cheers - moosey_jude

 

 

In file catalog/includes/classes/seo.class.php

 

Find (about line 820-830 depending on other fixes applied):

 

case 'manufacturers_id':

switch(true){

case ($page == FILENAME_DEFAULT && !$this->is_cPath_string($params) && !$this->is_product_string($params) ):

 

and change to:

 

case 'manufacturers_id':

switch(true){

case ($page == FILENAME_DEFAULT && !$this->is_cPath_string($params) && !$this->is_product_string($params) && strlen($this->get_manufacturer_name($p2[1]))>0 ) :

Link to comment
Share on other sites

hello, i have this problem with my install, im not good with php and not sure why.

 

i tried you fix but i still get no page.

 

Manufacturers list, still has the url as.

 

http://www.url.com/store/Manufacturer/ this just goes to no page?

 

 

any help would be great

 

tthanks again

 

I had a problem with SEO enabled whereby, having viewed a manufacturers products using the manufacturers drop down in the manufacturers infobox and then choosing the 'Please select' in the dropdown, a page not found error would occur. The fix appears below:

 

Cheers - moosey_jude

 

 

In file catalog/includes/classes/seo.class.php

 

Find (about line 820-830 depending on other fixes applied):

 

case 'manufacturers_id':

switch(true){

case ($page == FILENAME_DEFAULT && !$this->is_cPath_string($params) && !$this->is_product_string($params) ):

 

and change to:

 

case 'manufacturers_id':

switch(true){

case ($page == FILENAME_DEFAULT && !$this->is_cPath_string($params) && !$this->is_product_string($params) && strlen($this->get_manufacturer_name($p2[1]))>0 ) :

Link to comment
Share on other sites

hello, i have this problem with my install, im not good with php and not sure why.

 

i tried you fix but i still get no page.

 

Manufacturers list, still has the url as.

 

http://www.url.com/store/Manufacturer/ this just goes to no page?

 

 

any help would be great

 

tthanks again

 

I had a problem with SEO enabled whereby, having viewed a manufacturers products using the manufacturers drop down in the manufacturers infobox and then choosing the 'Please select' in the dropdown, a page not found error would occur. The fix appears below:

 

Cheers - moosey_jude

 

 

In file catalog/includes/classes/seo.class.php

 

Find (about line 820-830 depending on other fixes applied):

 

case 'manufacturers_id':

switch(true){

case ($page == FILENAME_DEFAULT && !$this->is_cPath_string($params) && !$this->is_product_string($params) ):

 

and change to:

 

case 'manufacturers_id':

switch(true){

case ($page == FILENAME_DEFAULT && !$this->is_cPath_string($params) && !$this->is_product_string($params) && strlen($this->get_manufacturer_name($p2[1]))>0 ) :

Link to comment
Share on other sites

sh*t? why did it post so many times?

mafiouso,

 

The forum has developed a little problem in recent weeks. When you post a message, it doesn't always update the page correctly. This leads people to believe their post wasn't recorded, even though it was, so they hit the "Add Reply" button again (and again, and again...) Each time, the post is added to the thread.

 

It's been happening in all the topics I keep tabs on, so you're in good company.

 

Cheers,

-Skittles

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