Jump to content
Sign in to follow this  
tec

sef urls for categories and products

Recommended Posts

Hey everyone, hope we are all doing well.

 

A client came to me with his site to do some work on it, i noticed in the admin and htacsess file that he has ultimate seo urls installed, however on the categories and products there are no sef urls.

The information pages such as shipping, about us etc all have sef urls but i cant get the categories and products to have them.

 

Anyone know what the problem might be?

 

here is the htaccess file

 

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

 

thanks muchly for all your help

T

Share this post


Link to post
Share on other sites

If the URLs were not working, then it might be a .htaccess issue, but if the links aren't SEO URLs, then it's a code or configuration issue. Try looking into includes/classes/seo.class.php or admin >> Configuration >> SEO URLs.

 

Another option would be to try installing a different version of the contribution (either older or newer). Perhaps the one that is installed now has a bug in it.


Always backup before making changes.

Share this post


Link to post
Share on other sites
If the URLs were not working, then it might be a .htaccess issue, but if the links aren't SEO URLs, then it's a code or configuration issue. Try looking into includes/classes/seo.class.php or admin >> Configuration >> SEO URLs.

 

Another option would be to try installing a different version of the contribution (either older or newer). Perhaps the one that is installed now has a bug in it.

 

Thank you kindly for your reply.

 

I have learned that it is not easy to try to figure out what version of the Ultimate SEF urls is being used, as its not really noted anywhere.

Another thing i learned was, there was code missing from the includes/application_top.php

 

when i put the needed code into this file, i did get sef urls, however, along with the sef urls i got an error that read something like

 

404 index.php could not be found

 

however, the urls were reading as they should, for instance, MYSITE.com/for-feet

 

i tried dumping the cache via the admin to try to eliminate the 404 error but it did not seem to help the problem

 

any further thoughts would be greatly appreciated

 

thanks muchly

t

Share this post


Link to post
Share on other sites

Try changing the .htaccess to

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

Backup first, as you will want to revert this later. The point is to find out to where it is rewriting your URLs.

 

Another thing to check is that maybe you should have

RewriteBase /

instead of /catalog/


Always backup before making changes.

Share this post


Link to post
Share on other sites

thank you kindly for your help......

 

didnt even dawn on me about the rewrite base url....think its time for a nap :)

 

i was able to get the sef urls to work....THANK YOU SO MUCH!!

 

would you happen to know how one might remove this from categories

 

-c-34

 

and this from products

 

-p-104

 

again, i really appreciate your help, thank you kindly

 

T

Share this post


Link to post
Share on other sites

You'd have to install a different SEO URLs contribution. Note that the -c-34 is what tells it what category you are viewing. If you install a contribution that takes it out, then you either have to add all your categories to the .htaccess or you need to look up the category name in the database. It's simpler (and more efficient) to just leave it, and for SEO purposes, it is irrelevant.


Always backup before making changes.

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
Sign in to follow this  

×