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

SEO Friendly Urls - a new approach

Recommended Posts

Hi, having a little difficulty in getting my not found urls to go where I want them. Ok, in the admin I have set the not found url method to equal '404 include page' and set the page for any 404 errors toa custom page. When I try and use this I just get a blank page. I've tried resetting the alias cache file but it's not working. Previously any unfound page went to the index.php page but I'm getting complaints from Google that I'm not using a 404 status code hence the change I'm trying to carry out. Any ideas?

 

Hi Richard.

 

404 not found is not an easy task, at least in oscommerce.

So in order not to have that white page, create an 404.php page but without oscommerce code and then go to admin and edit the option Handle not found urls as 404 include page? (404 status code) set to 404.php and then you will get the 404.php displayed.

 

Unfortunately there is not an easy way to make an oscommerce page as a 404 not found. In the next version I ll try to implement that. But for now the solution is to create a custom 404 page... 


Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

Hi Kenny,

 

Unfortunately  in current version there is no ability to get what you want. Instead you can do: http://yoursite.com/review?products_id=19

I did not foresee that need and thats why I did not code it. But if you want I can code it for you.

 

Awesome plugin! So easy to apply, worked perfectly right off the bat! Love it!

I'm building an alternative practitioner directory based on OSC - showing "categories" (cities) and "products" (therapists) without all the buying bits. Reviews, however, are critical and so reviews seo useful.


Steep learning curve? Hell, I don't even know enough to formulate a stupid question!!

Share this post


Link to post
Share on other sites

My database became corrupted and I had to reconstruct. Many of the SEO Friendly fields in the database disappeared. So, I figured I could just use the uninstall SEO Friendly URLs option that was still in the admin. Did the trick - all SEO Friendly URL database entries gone. I then could not figure out how to reinstall your plugin once uninstalled. Oops! Any advice before I pull any remaining hair?


Steep learning curve? Hell, I don't even know enough to formulate a stupid question!!

Share this post


Link to post
Share on other sites

My database became corrupted and I had to reconstruct. Many of the SEO Friendly fields in the database disappeared. So, I figured I could just use the uninstall SEO Friendly URLs option that was still in the admin. Did the trick - all SEO Friendly URL database entries gone. I then could not figure out how to reinstall your plugin once uninstalled. Oops! Any advice before I pull any remaining hair?

 

In order for the SEO FRIENDLY URLS to be uninstalled you must use the uninstall option then go to the front store so that option - action run. Then If you refresh the page the SEO FRIENDLY URLS will auto install again. But I dont know what will happen if some of the configurations is corrupted. In general I would suggest to go to the configuration table and remove all the keys that start with SEO_FRIENDLY_URLS_ and then go to the front store and seo frendly urls will auto install....


Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

I created another site with SEO Friendly URLs installed. I exported the database entries from that new install and pasted them into my working test database (the one that failed) using PHPmyAdmin. Now it works. I fully expected it to work just as you said:

 

Then If you refresh the page the SEO FRIENDLY URLS will auto install again.

But it didn't for me - even after removing all instances of SEO Friendly URLs in the database (I think).

 

I'm struggling with my web browsers after a recent Win10 update so it may not be your fine add-on - it could totally be just me! I'm not feeling the love for Win10 today.

 

My project is on hold anyway due to a PHP v5.2 issue on the hosting server (upgrading to 5.3 breaks other necessary parts of the web site). Feel like I'm in way over my head (I do web design, not SQL).

 

Thanks for the quick response. You rock big time! I may ask you to build the membership directory I'm working on now. OSC is WAY too complex for that job. But I don't code php very well (okay, not at all). I'll try your web site contact form again. Smiles to you.


Steep learning curve? Hell, I don't even know enough to formulate a stupid question!!

Share this post


Link to post
Share on other sites

I am currently using this excellent addon, with no problems at all, on my local server using Xampp.

 

But when i move my site to a "live" server, with SEO Friendly Urls set to "true", i get "page not found" errors or a redirection to page "500.htm". The problem seems to be im my htaccess file on the root place. When i follow the instructions and i add to the end of this file the following

 

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
</IfModule>

 

 

catalog home page opens but i cannot open any categories or products, plus i get errors in admin side too !!

 

My full htaccess is:

 

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

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
</IfModule>

 

 

and i ve even tried to uncommented the #AcceptPathInfo On line, but with no success.

 

Thanks in advance

Share this post


Link to post
Share on other sites

Please ignore my previus post. It was a server issue not allowing custom htaccess settings.

Share this post


Link to post
Share on other sites

Please ignore my previus post. It was a server issue not allowing custom htaccess settings.

 

Hi @@29gk

 

Glad it works..... Hope you like my addon...

 

P.S. Γεια σου πατριώτη...

Edited by gadlol

Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

Γεια και σε σένα :)

 

I ll let you know if i stumble again when i ll upload the site to the proper server.

Share this post


Link to post
Share on other sites

Hello @@gadlol

 

Thank you for this great addon. I'm trying to make it work in my new EDGE version but I have an "Internal Server Error".

 

In application_top.php I replaced FILENAME_SHOPPING_CART with 'shopping_cart.php' , and DIR_WS_CLASSES . 'seo_friendly_urls.php' with 'includes/classes/seo_friendly_urls.php', but it's still the same.

 

I think I have to change the code in .htaccess and change REQUEST_FILENAME but what do I have to put instead ?

 

Thanks a lot.

Edited by aurelou

Share this post


Link to post
Share on other sites

Hello @@gadlol

 

Thank you for this great addon. I'm trying to make it work in my new EDGE version but I have an "Internal Server Error".

 

In application_top.php I replaced FILENAME_SHOPPING_CART with 'shopping_cart.php' , and DIR_WS_CLASSES . 'seo_friendly_urls.php' with 'includes/classes/seo_friendly_urls.php', but it's still the same.

 

I think I have to change the code in .htaccess and change REQUEST_FILENAME but what do I have to put instead ?

 

Thanks a lot.

 

Hi @@aurelou ....

 

You may edit the seo_friendly_urls.php class and try to  change all the $HTTP_GET_VARS to $_GET and find all the FILENAME_ defines and replace them with the file. In example: FILENAME_DEFAULT => 'index.php'


Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

Thanks a lot for your answer @@gadlol. I did what you mentionned but it's still the same.. 500 internal server error.

 

Maybe the problem is different ? I installed several addons like the modular product info page, and in product_info.php I already had  require_once 'includes/application_top.php';

Share this post


Link to post
Share on other sites

Thanks a lot for your answer @@gadlol. I did what you mentionned but it's still the same.. 500 internal server error.

 

Maybe the problem is different ? I installed several addons like the modular product info page, and in product_info.php I already had  require_once 'includes/application_top.php';

 

Hmmmm, i dont know about that.... Maybe there are conflictions between addons....


Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

Ok I found the problem :blush:

 

I copied the code for the .htaccess file from the pdf installation file and it displayed in 3 lines instead of 7. I didn't know it was important to go back to the line. So the problem is solved, and thank you anyway because I would have had to make the changes in the class file.

 

My URLs are very pretty now ;)

Edited by aurelou

Share this post


Link to post
Share on other sites

Hi... the XML sitemap generator (http://addons.oscommerce.com/info/6583) does not use the oscommerce tep_href_link instead it uses a class method hrefLink.

 

Thats why that addon does not work with the Seo Friendly Urls.

 

I dont know if there is any sitemap addon that uses the osc default functions for generating the urls....


Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

@@GlenPig

 

@@aurelou

 

 

 

I can highly recommend the files that Gary linked.


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

Hi

Installed this as per your instructions on oscommerce 2.3.4 version which is being hosted on Linux server running php 5.6 and Apache. Admin side works fine but am getting a blank home page

.. help!!

Share this post


Link to post
Share on other sites
58 minutes ago, janeyred said:

Hi

Installed this as per your instructions on oscommerce 2.3.4 version which is being hosted on Linux server running php 5.6 and Apache. Admin side works fine but am getting a blank home page

.. help!!

Hi...

blank home page can mean lots o fthings. Maybe you did something wrong during installation. Maybe this is probably the htaccess file. Does your server produce any error logs (apache error logs)?

Are all the pages blank or the homepage only?

Can you give me the url so to check it?

 


Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

Hi I've checked the install and it appears correct. Here is the htaccess file content:

# $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
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
</IfModule>
 

 

I have tried it with AccessPathInfo commented out as well,this made no difference. I can access the Admin side fully - no issues there at all but I cannot access the shop site via index.php - I get blank page at index.php. Using historical links I can reach some pages such as catalog/login.php although the actual logging in forms are not showing and so on.

www.simply-hairandbeautycare.com/catalog

 

Thanks in advance :-)

 

Share this post


Link to post
Share on other sites
3 minutes ago, janeyred said:

Hi I've checked the install and it appears correct. Here is the htaccess file content:

# $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
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
</IfModule>
 

 

I have tried it with AccessPathInfo commented out as well,this made no difference. I can access the Admin side fully - no issues there at all but I cannot access the shop site via index.php - I get blank page at index.php. Using historical links I can reach some pages such as catalog/login.php although the actual logging in forms are not showing and so on.

www.simply-hairandbeautycare.com/catalog

 

Thanks in advance :-)

 

Did you changed in the index.php the   require('includes/application_top.php'); to   require_once('includes/application_top.php'); ???


Check out the great Alternative Administration System addon for osCommerce!

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

×