Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 12 votes

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


6505 replies to this topic

#6361 Trentide

  • Community Member
  • 471 posts
  • Real Name:Jason Maier
  • Gender:Male

Posted 23 November 2011, 18:47

Ok, great. Thanks again, Jack_mcs!

Jason

#6362 kaushikrabadiya

  • Community Member
  • 2 posts
  • Real Name:Kaushik

Posted 24 November 2011, 11:11

Hello,

I want to remove category id , manufacture id and product id from url as well i want to remove .html from url can you tell me how ?

Thanks,
Kaushik

#6363 kaushikrabadiya

  • Community Member
  • 2 posts
  • Real Name:Kaushik

Posted 24 November 2011, 11:12

Hello,

I want to remove category id , manufacture id and product id from url as well i want to remove .html from url can you tell me how ?

Thanks,
Kaushik

#6364 Slowly Learning

  • Community Member
  • 8 posts
  • Real Name:Dayve Jacobus

Posted 25 November 2011, 07:08

Hello All
I am just stuck.
I'm getting a 404 error when I click on a product or category. IE and FireFox
I'm installed in the root directory.
version 2.3.1 and 2.2d

any idea what I did wrong?

here's my entire .htaccess

# $Id$
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
# AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

#<IfModule mod_setenvif.c>
# <IfDefine SSL>
# SetEnvIf User-Agent ".*MSIE.*" \
# nokeepalive ssl-unclean-shutdown \
# downgrade-1.0 force-response-1.0
# </IfDefine>
#</IfModule>

# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter

# AcceptPathInfo On

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)

# php_value session.use_trans_sid 0
# php_value register_globals 1


# Begin Ultimate SEO V2.2d
Options +FollowSymLinks
RewriteEngine On

# RewriteBase instructions
# Change RewriteBase dependent on how your shop is accessed as below.
# http://www.mysite.com = RewriteBase /
# http://www.mysite.com/catalog/ = RewriteBase /catalog/
# http://www.mysite.com/catalog/shop/ = RewriteBase /catalog/shop/

# Change the following line using the instructions above

RewriteBase /orleather.ipage.com/

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 ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_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 ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING}
# End Ultimate SEO V2.2d

Thanks for your advice!!

#6365 Jack_mcs

  • Community Member
  • 24,439 posts
  • Real Name:Jack
  • Gender:Male

Posted 25 November 2011, 14:07

View PostSlowly Learning, on 25 November 2011, 07:08, said:

Hello All
I am just stuck.
I'm getting a 404 error when I click on a product or category. IE and FireFox
I'm installed in the root directory.
version 2.3.1 and 2.2d

RewriteBase /orleather.ipage.com/

The RewriteBase line contains your shops directory. If you shop located in the orleather.ipage.com directory? If so, please post your url.

#6366 Slowly Learning

  • Community Member
  • 8 posts
  • Real Name:Dayve Jacobus

Posted 25 November 2011, 22:08

Thanks for your reply.
I started installing Ultimate SEO on a clean new install of OScommerce.

I'm at orleather.ipage.com for now.

Thanks

#6367 Slowly Learning

  • Community Member
  • 8 posts
  • Real Name:Dayve Jacobus

Posted 25 November 2011, 23:36

You sent me in the right direction, thank you.
taking the domain out of that line and going with plain old
RewriteBase /

Worked perfect.
Thanks again

#6368 CORENERED

  • Community Member
  • 8 posts
  • Real Name:Oscar Farfan
  • Gender:Male

Posted 28 November 2011, 21:10

View PostJack_mcs, on 22 November 2011, 23:15, said:

Chemo is no longer with us.

What is the error?

Hi Jack_mcs
I aminstallingUltimateSEOURLsmoduleforosCommerceMS-2.2orRC2, andupload thetwo filesandchangethe other 4.
After loadingthe files,edit thelast. Htaccess, but whenI load it, I can notenterany of the products, because itredirectsback to theindex. It is nothappening.

Thanks so much!
CORENERED

#6369 Jack_mcs

  • Community Member
  • 24,439 posts
  • Real Name:Jack
  • Gender:Male

Posted 28 November 2011, 23:27

View PostCORENERED, on 28 November 2011, 21:10, said:


Hi Jack_mcs
I aminstallingUltimateSEOURLsmoduleforosCommerceMS-2.2orRC2, andupload thetwo filesandchangethe other 4.
After loadingthe files,edit thelast. Htaccess, but whenI load it, I can notenterany of the products, because itredirectsback to theindex. It is nothappening.

Thanks so much!
CORENERED
I'm not sure I understand the problem due to no spacing in your text but it sounds like you are using a template that has bad code in it. This is a common problem. See this post.

#6370 CORENERED

  • Community Member
  • 8 posts
  • Real Name:Oscar Farfan
  • Gender:Male

Posted 29 November 2011, 21:11

Hi Jack_mcs
Sorry my english.
I'll try to explain you better.
I purchased a template from the perfectory.com page. Then install the module Ultimate SEO URLs v2.1 - by Chemo, but when I click on any product says, Not Found; Additionally, a 404 Not Found error was....
I no longer know what to do.
Help me please... [img]http://forums.oscommerce.com//public/style_emoticons/default/unsure.png[/img]

#6371 Jack_mcs

  • Community Member
  • 24,439 posts
  • Real Name:Jack
  • Gender:Male

Posted 30 November 2011, 04:41

View PostCORENERED, on 29 November 2011, 21:11, said:

Hi Jack_mcs
Sorry my english.
I'll try to explain you better.
I purchased a template from the perfectory.com page. Then install the module Ultimate SEO URLs v2.1 - by Chemo, but when I click on any product says, Not Found; Additionally, a 404 Not Found error was....
I no longer know what to do.
Help me please... [img]http://forums.oscommerce.com//public/style_emoticons/default/unsure.png[/img]
First, you should be using V2.2d, not 2.1. Once you update it, if you are still having the problem, please post the url to your shop and the .htaccess file in the root of the shop and I will take a look at them.

#6372 CORENERED

  • Community Member
  • 8 posts
  • Real Name:Oscar Farfan
  • Gender:Male

Posted 30 November 2011, 13:31

View PostJack_mcs, on 30 November 2011, 04:41, said:

First, you should be using V2.2d, not 2.1. Once you update it, if you are still having the problem, please post the url to your shop and the .htaccess file in the root of the shop and I will take a look at them.

Could you give me the direct link download?

#6373 Jack_mcs

  • Community Member
  • 24,439 posts
  • Real Name:Jack
  • Gender:Male

Posted 30 November 2011, 14:12

View PostCORENERED, on 30 November 2011, 13:31, said:


Could you give me the direct link download?
It's in the addons section above. Just search there.

#6374 CORENERED

  • Community Member
  • 8 posts
  • Real Name:Oscar Farfan
  • Gender:Male

Posted 30 November 2011, 14:30

View PostJack_mcs, on 30 November 2011, 14:12, said:

It's in the addons section above. Just search there.

Yes i know, but i don't find.

#6375 adrianconchie

  • Community Member
  • 18 posts
  • Real Name:A Conchie
  • Gender:Male

Posted 30 November 2011, 17:06

Hi,

I hope someone can help.

I have installed this contribution and it seemed fairly straight forward to install, however I am getting a 404 page for all of the URL's.

The admin section works fine and when I switch the contribution off in the admin cp, the site works fine again.

I have read about the RewriteBase / function and that if this is not configured correctly, then this can cause 404 pages (not loading), but my catalog is set in the root directory of the site, so I have set it to RewriteBase / but this still does not work.

My site is http://www.thelightershop.co.uk the catalog is located in the root directory.

This is my .htaccess file:

# Begin Ultimate SEO V2.2d
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 ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_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 ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING}
# End Ultimate SEO V2.2d

In my configure.php file, I have the line:

define('DIR_FS_CATALOG', '/content/Hosting/t/h/thelightershop.co.uk/web/');

so, I have also tried:

RewriteBase /content/Hosting/t/h/thelightershop.co.uk/web/

and

RewriteBase /web/

But none of these work either. I have also double checked that I have edited and installed all of the files properly. Please help!

Thanks

#6376 adrianconchie

  • Community Member
  • 18 posts
  • Real Name:A Conchie
  • Gender:Male

Posted 30 November 2011, 17:32

re: my previous post above I forgot to include the version of the contribution - V2.2d

#6377 Jack_mcs

  • Community Member
  • 24,439 posts
  • Real Name:Jack
  • Gender:Male

Posted 30 November 2011, 17:43

View Postadrianconchie, on 30 November 2011, 17:32, said:

re: my previous post above I forgot to include the version of the contribution - V2.2d
It looks like you have everything setup correctly. You should first check with your host that mod rewrite is enabled. if it is, then try chaning this line and refreshing the home page
Options +FollowSymLinks
to
#Options +FollowSymLinks


#6378 adrianconchie

  • Community Member
  • 18 posts
  • Real Name:A Conchie
  • Gender:Male

Posted 30 November 2011, 18:14

I've just spoke to my host and they have said that it is a Zeus server and the Rewrite function is for Apache servers. They suggested using a conversion script. I will have a look online for one.

Any suggestions in the meantime?

#6379 adrianconchie

  • Community Member
  • 18 posts
  • Real Name:A Conchie
  • Gender:Male

Posted 30 November 2011, 20:48

I managed to sort out the Zeus problem.

I had to convert the .htaccess Apache script to a Zeus "rewrite.script" file by modifying the script. It seems to work now, although I've not fully tested it.

There doesn't seem to be anywhere else on the web which gives you the script, or refers to this problem so, In case anyone else is on a Zeus server and is having the same problem - here is the rewrite script I used:

RULE_0_START:
	# get the document root
	map path into SCRATCH:DOCROOT from /
	# initialize our variables
	set SCRATCH:ORIG_URL = %{URL}
	set SCRATCH:REQUEST_URI = %{URL}
	# prepare to search for file, rewrite if its not found
	set SCRATCH:REQUEST_FILENAME = %{SCRATCH:DOCROOT}
	set SCRATCH:REQUEST_FILENAME . %{SCRATCH:REQUEST_URI}
	look for file at %{SCRATCH:REQUEST_FILENAME}
	if not exists then
	look for dir at %{SCRATCH:REQUEST_FILENAME}
	endif
RULE_0_END:
 
RULE_1_START:
 
match URL into $ with ^(.*)-p-(.*).html
if matched then
set URL=/product_info.php?products_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-c-(.*).html
if matched then
set URL=/index.php?cPath=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-m-(.*).html
if matched then
set URL=/index.php?manufacturers_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-pi-(.*).html
if matched then
set URL=/popup_image.php?pID=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-by-(.*).html
if matched then
set URL=/all-products.php?fl=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-t-(.*).html
if matched then
set URL=/articles.php?tPath=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-a-(.*).html
if matched then
set URL=/article_info.php?articles_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-au-(.*).html
if matched then
set URL=/articles.php?authors_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-pr-(.*).html
if matched then
set URL=/product_reviews.php?products_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-pri-(.*).html
if matched then
set URL=/product_reviews_info.php?products_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-f-(.*).html
if matched then
set URL=/faqdesk_info.php?faqdesk_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-fc-(.*).html
if matched then
set URL=/faqdesk_index.php?faqPath=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-fri-(.*).html
if matched then
set URL=/faqdesk_reviews_info.php?faqdesk_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-fra-(.*).html
if matched then
set URL=/faqdesk_reviews_article.php?faqdesk_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-i-(.*).html
if matched then
set URL=/information.php?info_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-links-(.*).html
if matched then
set URL=/links.php?lPath=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-pm-([0-9]+).html
if matched then
set URL=/info_pages.php?pages_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-n-(.*).html
if matched then
set URL=/newsdesk_info.php?newsdesk_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-nc-(.*).html
if matched then
set URL=/newsdesk_index.php?newsPath=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-nri-(.*).html
if matched then
set URL=/newsdesk_reviews_info.php?newsdesk_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-nra-(.*).html
if matched then
set URL=/newsdesk_reviews_article.php?newsdesk_id=$2&%
goto QSA_RULE_START
endif
 
match URL into $ with ^(.*)-po-([0-9]+).html
if matched then
set URL=/pollbooth.php?pollid=$2&%
goto QSA_RULE_START
endif
 
RULE_1_END:
 
QSA_RULE_START:
# append the query string if there was one originally
# the same as [QSA,L] for apache
match SCRATCH:ORIG_URL into % with \?(.*)$
if matched then
set URL = %{URL}&%{SCRATCH:QUERY_STRING}
endif
goto END
QSA_RULE_END:


#6380 CORENERED

  • Community Member
  • 8 posts
  • Real Name:Oscar Farfan
  • Gender:Male

Posted 30 November 2011, 22:07

Hi.
V2.2d version already installed and I check my files multiple times.
This is my .htaccess
But now whenI click onany product,it returns the index.
http://medirsei.co/
My host is godaddy.com


# Begin Ultimate SEO V2.2d
#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 ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_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 ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING}
# End Ultimate SEO V2.2d

Edited by CORENERED, 30 November 2011, 22:09.