Jump to content
Latest News: (loading..)
spidometrs

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

Recommended Posts

Looks like you failed to add the required function to admin/includes/functions/general.php

 

Go back through the install instructions.

 

thanks for that,

looks like i changed the wrong file.

I changed the includes/functions/general.php not the admin/includes/functions/general.php

That error has now gone, but when i click an product image on the store i get an error page.

 

Link

 

.htaccess file

(Located at homepage/catalog/.htaccess)

 

# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $

#

# 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

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /directory/

 

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}

 

 

Thanks.

Share this post


Link to post
Share on other sites

thanks for that,

looks like i changed the wrong file.

I changed the includes/functions/general.php not the admin/includes/functions/general.php

That error has now gone, but when i click an product image on the store i get an error page.

 

RewriteBase /directory/

 

Should be ..

 

RewriteBase /catalog/

 

that link didn't work by the way.

Share this post


Link to post
Share on other sites

On a more general level, has anyone here had issues with sessions when manipulating the URL for SEO?

That's a very general question so I don't know what you mean. The only problem I am aware of is when the configure file isn't setup correctly so the session ID's are left in the url. That has been covered many times in this thread if you need to know how to set it up.

Share this post


Link to post
Share on other sites

RewriteBase /directory/

 

Should be ..

 

RewriteBase /catalog/

 

that link didn't work by the way.

 

 

thanks for that....i should read more clearly.

Im not getting an error page anymore but the link is reverting back to the index page now.

Were getting there.

thanks.

Share this post


Link to post
Share on other sites

I suggest you upload it to a new location with the option of No Public Upload allowed, and create a new support thread as this one is far too long to find relevant posts.

Yes, I agree it is a mess, and that's a shame, but creating a new addon would probably just add to the confusion. Hopefully the version numbers will be respected by others so that updates can at least be separated that way.

Share this post


Link to post
Share on other sites

thanks for that....i should read more clearly.

Im not getting an error page anymore but the link is reverting back to the index page now.

Were getting there.

thanks.

 

 

You have some bad redirect code in place which looks to be php code as opposed to .htaccess.

 

What the code seems to be trying to do is redirect (without the correct 301 headers) ..

 

www.mysite.com/

 

To

 

www.mysite.com/index.php

 

This is capturing the seo urls and redirecting them.

Share this post


Link to post
Share on other sites

Two quick questions about the AWESOME add-on:

 

Just installed 22d_7, closely followed the instructions, and am getting this error:

 

500 Internal Server Error

 

Fatal error: Call to undefined function gzdeflate() in /usr/local/sftp2/www/www.hollywoodheroes.com/htdocs/includes/classes/seo.class.php on line 2367

 

 

Also, it appears that the catalog I'm working on has been installed in an "htdocs" directory (even though the URL doesn't show that - just www.hollywoodheroes.com). My .htaccess file is then inside an "includes" includes directory. Not sure what my "RewriteBase /directory/" should look like.

 

Help me Obi-Wan!

Share this post


Link to post
Share on other sites

Two quick questions about the AWESOME add-on:

 

Just installed 22d_7, closely followed the instructions, and am getting this error:

 

500 Internal Server Error

 

Fatal error: Call to undefined function gzdeflate() in /usr/local/sftp2/www/www.hollywoodheroes.com/htdocs/includes/classes/seo.class.php on line 2367

 

 

Also, it appears that the catalog I'm working on has been installed in an "htdocs" directory (even though the URL doesn't show that - just www.hollywoodheroes.com). My .htaccess file is then inside an "includes" includes directory. Not sure what my "RewriteBase /directory/" should look like.

 

Help me Obi-Wan!

 

RewriteBase /

 

gzdeflate() is a standard php function that it seems your hosts have turned off.

 

You will need to modify seo.class.php if this is the case.

Share this post


Link to post
Share on other sites

RewriteBase /

 

gzdeflate() is a standard php function that it seems your hosts have turned off.

 

You will need to modify seo.class.php if this is the case.

 

Thank you very much - I'll try that!

 

So, modify the seo.class.php so it reads "base64_encode(gzdeflate($value, 0))" instead of "base64_encode(gzdeflate($value, 1))"? Will it still work?

 

Thanks again!

Share this post


Link to post
Share on other sites

Thank you very much - I'll try that!

 

So, modify the seo.class.php so it reads "base64_encode(gzdeflate($value, 0))" instead of "base64_encode(gzdeflate($value, 1))"? Will it still work?

 

Thanks again!

 

Try this ..

 

Find ..

 

gzinflate(base64_decode($cache['cache_data']))

 

Change to ..

base64_decode( $cache['cache_data'] )

 

Find ..

 

base64_encode(gzdeflate($value, 1))

 

Replace with ..

 

base64_encode( $value )

Share this post


Link to post
Share on other sites

So, modify the seo.class.php so it reads "base64_encode(gzdeflate($value, 0))" instead of "base64_encode(gzdeflate($value, 1))"? Will it still work?

You could also ask your host to enable it in their php. It has been standard for years now so they either have a very old version or just didn't include it in their compile. They really should fix it either way, in my opinion, though some hosts won't.

Share this post


Link to post
Share on other sites

Try this ..

 

Find ..

 

gzinflate(base64_decode($cache['cache_data']))

 

Change to ..

base64_decode( $cache['cache_data'] )

 

Find ..

 

base64_encode(gzdeflate($value, 1))

 

Replace with ..

 

base64_encode( $value )

 

 

That got me rolling! I really, really appreciate the help. It looks like it is working, but the product and categories are giving me a 404 error. The default page works great. Check it out: http://www.hollywoodheroes.com/

 

The URL looks like I expect it to look (http://www.hollywoodheroes.com/star-wars-yoda-lightsaber-chopsticks-p-1383.html, for example).

 

I can only leave the site like this for a minutes before I have to roll it back.

 

Again, greatly appreciating the help here!

Share this post


Link to post
Share on other sites

Had to roll back. So close!

 

I'm thinking it is an .htcaccess problem. I'm running OSCommerce 2.2. My .htcaccess file is in this directory: "/includes/.htcaccess".

 

Per FWR's suggestion, I have the "RewriteBase /" set.

 

Or am I off base? It did successfully change "http://www.hollywoodheroes.com/product_info.php?products_id=1383" to this "http://www.hollywoodheroes.com/star-wars-yoda-lightsaber-chopsticks-p-1383.html", but that new-and-improved link lead to a 404.

 

This is gonna be stellar if I can get it working! Thanks again!

Share this post


Link to post
Share on other sites

Had to roll back. So close!

 

I'm thinking it is an .htcaccess problem. I'm running OSCommerce 2.2. My .htcaccess file is in this directory: "/includes/.htcaccess".

 

Per FWR's suggestion, I have the "RewriteBase /" set.

 

Or am I off base? It did successfully change "http://www.hollywoodheroes.com/product_info.php?products_id=1383" to this "http://www.hollywoodheroes.com/star-wars-yoda-lightsaber-chopsticks-p-1383.html", but that new-and-improved link lead to a 404.

 

This is gonna be stellar if I can get it working! Thanks again!

Share this post


Link to post
Share on other sites

Had to roll back. So close!

 

I'm thinking it is an .htcaccess problem. I'm running OSCommerce 2.2. My .htcaccess file is in this directory: "/includes/.htcaccess".

 

Per FWR's suggestion, I have the "RewriteBase /" set.

 

Or am I off base? It did successfully change "http://www.hollywoodheroes.com/product_info.php?products_id=1383" to this "http://www.hollywoodheroes.com/star-wars-yoda-lightsaber-chopsticks-p-1383.html", but that new-and-improved link lead to a 404.

 

This is gonna be stellar if I can get it working! Thanks again!

Share this post


Link to post
Share on other sites

Had to roll back. So close!

 

I'm thinking it is an .htcaccess problem. I'm running OSCommerce 2.2. My .htcaccess file is in this directory: "/includes/.htcaccess".

 

Per FWR's suggestion, I have the "RewriteBase /" set.

 

Or am I off base? It did successfully change "http://www.hollywoodheroes.com/product_info.php?products_id=1383" to this "http://www.hollywoodheroes.com/star-wars-yoda-lightsaber-chopsticks-p-1383.html", but that new-and-improved link lead to a 404.

 

This is gonna be stellar if I can get it working! Thanks again!

Share this post


Link to post
Share on other sites

Had to roll back. So close!

 

I'm thinking it is an .htcaccess problem. I'm running OSCommerce 2.2. My .htcaccess file is in this directory: "/includes/.htcaccess".

 

Per FWR's suggestion, I have the "RewriteBase /" set.

 

Or am I off base? It did successfully change "http://www.hollywoodheroes.com/product_info.php?products_id=1383" to this "http://www.hollywoodheroes.com/star-wars-yoda-lightsaber-chopsticks-p-1383.html", but that new-and-improved link lead to a 404.

 

This is gonna be stellar if I can get it working! Thanks again!

Share this post


Link to post
Share on other sites

I'm thinking it is an .htcaccess problem. I'm running OSCommerce 2.2. My .htcaccess file is in this directory: "/includes/.htcaccess".

That's the wrong .htacess file. You need to edit the one in the root of the shop.

Share this post


Link to post
Share on other sites

First of all - thanks for this great contribution!

 

I use Ultimate SEO 2-2.2d-4.

 

I have the following problem. Some of my products are stored in two categories.

 

I choose a category with the menu. And then if I change from product listing to the product page, the category changes to the first category of the product (in the menu, in the breadcrumb and in the link to the next/prev product) - so cPath has the wrong value.

 

Does anybody know how I can solve this problem?

 

Thanks in advance for tipps.

 

Anathema

Share this post


Link to post
Share on other sites

That's the wrong .htacess file. You need to edit the one in the root of the shop.

 

Thank you for the suggestion. Didn't know you could have more than one. I put it in the root, but get a 500 internal server error. Maybe I'm not using the "right root". The root should be where the index.php file is, right? Could it possibly be above that?

 

(and deepest apologies for the multi-posting. It kept timing out, so I didn't think it went through)

Share this post


Link to post
Share on other sites

Thank you for the suggestion. Didn't know you could have more than one. I put it in the root, but get a 500 internal server error. Maybe I'm not using the "right root". The root should be where the index.php file is, right? Could it possibly be above that?

 

(and deepest apologies for the multi-posting. It kept timing out, so I didn't think it went through)

 

Your root is htdocs/

 

Ask your host if mod_rewrite is enabled (you can see this yourself in phpinfo() )

 

Also you need to know if AllowOverride has sufficient permissions for rewriteRules.

Share this post


Link to post
Share on other sites

You have some bad redirect code in place which looks to be php code as opposed to .htaccess.

 

What the code seems to be trying to do is redirect (without the correct 301 headers) ..

 

www.mysite.com/

 

To

 

www.mysite.com/index.php

 

This is capturing the seo urls and redirecting them.

 

 

Hi,

Would you be able to PM me regarding this. Im looking for some help in fixing this. Let me know a cost.

Many Thanks.

Share this post


Link to post
Share on other sites

Hi,

Would you be able to PM me regarding this. Im looking for some help in fixing this. Let me know a cost.

Many Thanks.

 

Requests/punting for commercial services are not allowed on this forum sorry.

 

If you want to contact anyone for this type of service you should send them a direct email or a personal message.

Share this post


Link to post
Share on other sites

Hi

 

This contrib is very good it fix many of my problems. But i have a new problem when a installed it now my old seo urls was the url like this :

 

www.homepage.com/testing/ now with the new Seo urls it will be like this www.homepage.com/testing-p-70.html

 

I have redirected the category to the new one but i see i have 1500 indexed on google and how can i fix the old products.

 

Like this is the old one : www.homepage.com/vetekuddar/vetevaerme-hjaerta-297/ and the new one is : http://www.homepage....arta-p-297.html

 

is it possible the change this new seo urls shows the old urls like www.homepage.com/testing/ instead of : www.homepage.com/testing-p-70.html

 

Sow it's like before with the old seo urls?

 

/Best Regards Marcus

Share this post


Link to post
Share on other sites

Hi

 

This contrib is very good it fix many of my problems. But i have a new problem when a installed it now my old seo urls was the url like this :

 

www.homepage.com/testing/ now with the new Seo urls it will be like this www.homepage.com/testing-p-70.html

 

I have redirected the category to the new one but i see i have 1500 indexed on google and how can i fix the old products.

 

Like this is the old one : www.homepage.com/vetekuddar/vetevaerme-hjaerta-297/ and the new one is : http://www.homepage....arta-p-297.html

 

is it possible the change this new seo urls shows the old urls like www.homepage.com/testing/ instead of : www.homepage.com/testing-p-70.html

 

Sow it's like before with the old seo urls?

 

/Best Regards Marcus

 

I tried to answer this in your other post.

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

×