Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

Strange, so it must be a server setting somewhere. It's the same server, only thing we changed was the PHP version and it worked on PHP 5.3 but not 5.4.

 

As far as I can tell mod_rewrite is enabled. Do you know what other settings need to be on?

 

Thanks

 

--------
@@Tsimi

The catalog is in the root of our public_html directory. My RewriteBase path is:
RewriteBase /
Anything else breaks it. Again, it works file like this if PHP version is 5.3

Arigato gozaimashita

 

--------------

Upon re-reading PHP.net makes the distinction that "call-time pass-by-reference" is deprecated. So apparently a parameter received by reference by a function is still ok.

Edited by yomama360

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself.

Therefore, all progress depends upon the unreasonable man."

-- George Bernard Shaw

Link to comment
Share on other sites

Tried it, didnt work.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself.

Therefore, all progress depends upon the unreasonable man."

-- George Bernard Shaw

Link to comment
Share on other sites

  • 3 weeks later...

Hi Jack,

 

I installed Ultimate SEO V 2.2d on 2.3.4 using the bootstrap template and all was well. I have been using the different versions for years and they always worked perfectly. However, after adding Header Tags SEO the URL's will not work properly. I get the same url problem mentioned here in some other posts, it appears as -p-xx.html

 

When I refresh the page the correct url appears, but revisiting the site after closing the browser and it is back to -p-xx.html. Google is also redirecting the correct links this-product-p-22.html with the 301 permanent redirect to the -p-xx.html link. Now all of my pages appear in Google results as -p-xx.html

 

After searching for several days for an answer and testing every possible configuration, removing Options +FollowSymLinks from .htaccess, checking the rewrite base 100 times, installing and reinstalling both contributions, I just can't figure this out.

 

Any ideas on what may be causing this would be greatly appreciated.

 

Thank you in advance for your support of these contributions and the community at large.

Link to comment
Share on other sites

If it was working before Header Tags SEO was installed, then maybe you didn't run Fill Tags in HTS or you have the use header tags option set in this one and have not filled in the needed tags in HTS. No one has ever reported such a problem and I haven't seen it myself with all of the installations of the two I've done so it has to be something unique to your situation. You could try running the uninstall/install scripts for HTS to eliminate any settings changes you may have made.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

If it was working before Header Tags SEO was installed, then maybe you didn't run Fill Tags in HTS or you have the use header tags option set in this one and have not filled in the needed tags in HTS. No one has ever reported such a problem and I haven't seen it myself with all of the installations of the two I've done so it has to be something unique to your situation. You could try running the uninstall/install scripts for HTS to eliminate any settings changes you may have made.

 

Hi Jack,

 

Thank you so much for your reply.  After being reassured by you that you had experienced no conflicts with your install, I was sure the problem was with my install, and this was indeed the case. The code for 2.3.4 is different and in placing the code in application_top.php I had inserted it just before the correct line. I repeated this mistake many times for some reason, but after receiving your reply I went through each step MUCH more carefully and now everything works PERFECT!

 

I sincerely apologize for troubling you with this, but your reply is certainly what helped me fix it, so I really appreciate your prompt reply and these awesome contributions. I am really happy to have found the Header Tags SEO, it works so much better and is so much easier than the previous hacks I created to accomplish this.

 

Thanks Again Jack, the community is blessed to have a great contributor like you.

Edited by James Turner
Link to comment
Share on other sites

Special Characters issue

Installed the latest version and just realized today that the special characters are not converted but just removed from the URL.
As far I can recall with the older version Ultimate SEO 2-2.2d-13 and php 5.4 everything was running fine.

 

This is what I have added:

Ü=>Ue,ü=>ue,Ö=>Oe,ö=>oe,Ä=>Ae,ä=>ae,ß=>ss,é=>e,è=>e,à=>a,ù=>u,â=>a,ê=>e,î=>i,ô=>o,û=>u,ë=>e,ï=>i,ç=>

 

Just out of curiosity I replaced the classes/seo.class.php file with the one from the Ultimate SEO 2-2.2d-13 package. Now the URL shows fine but the page won't load/show. Getting some sort of "The page isn't redirecting properly....bla bla bla" error.
 

So is this php related or addon related?

Edited by Tsimi
Link to comment
Share on other sites

Did a quick "local" install using XAMPP that runs php 5.5.19 characters didn't show at first either but after a SEO URLs Cache reset the converted characters show in the URL.

Now that confuses me more,...what could cause something like this? local (XAMPP) running php 5.5.19 works and live server also running php 5.5.19 doesn't.

 

Does it matter if database is MySQL is 5.0.95 or 5.6.21?

Edited by Tsimi
Link to comment
Share on other sites

Regarding my two posts above....

After tweaking for hours I finally found the problem.

 

inside the seo.class.php file

 

look for this code around line 1825

$string =  iconv("ISO-8859-1", "UTF-8//TRANSLIT", $string);

and replace with

 $string == iconv("ISO-8859-1", "UTF-8//TRANSLIT", $string);

one small, stupid = was missing. That was all! <_<

 

So if you out there have problems with special characters not showing inside the URL then try this fix.

 

Don't know why but my local server (Windows) doesn't seem to bother if there is only 1 = or 2 == but the live server based on linux did bother.

Edited by Tsimi
Link to comment
Share on other sites

lol just realized doing the above is same as deactivating the code completely.

 

Adding double slashes // in front of it works too. This solution only works for my live server (linux). For my local server (XAMPP, windows based) it doesn't work.

Link to comment
Share on other sites

@@Jack_mcs

 

Duh, why i didn't see this? *handpalmtoforeheadslam*

I searched this topic for "special characters" but it didn't show in the search results.

Anyway, that fix worked. Thanks!

Edited by Tsimi
Link to comment
Share on other sites

Hello Jack,

my site opens to mysite/oscommerce and not mysite/oscommerce/index.php which causes these errors (below). when inside the site and you hit catalog, site goes to index.php.  I have checked includes/filenames and filename_default does read index.php.  Is this something I need to change in my seo instal on.htaccess ?

 

Error: Undefined index: path
File: includes/classes/seo.class.php
Line: 2593
Error: Undefined index: path
File: includes/classes/seo.class.php
Line: 2629
Error: Undefined index: path
File: includes/classes/seo.class.php
Line: 2700
Error: Undefined index: path
File: includes/classes/seo.class.php
Line: 2730
Error: Undefined index: path
File: includes/classes/seo.class.php
Line: 2826
Link to comment
Share on other sites

It sounds like your shop is located in a sub-directory but you've made the .htaccess changes to the root directory. If that is not the case, please post your .htaccess and includes/configure.php file here. For the latter, don't include the last few lines that have the login details and you can X-out the domain name if you prefer.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Yes Jack, my site in in a directory in the public_html and this is where I put the .htaccess.  Should I add another .htaccess inside my directory and keep both or remove the one in the root.  The url do work as it is now. Thanks for your help

Link to comment
Share on other sites

Hello Jack, I have placed the rewrite in both places root folder and sub-directory and still have issues, so here is my .htaccess in root:

 

 

RewriteEngine on

 

RewriteCond %{HTTP_HOST} ^xxxx\.biz$ [OR]

RewriteCond %{HTTP_HOST} ^www\.xxxx\.biz$

RewriteRule ^/?$ "http\:\/\/xxxx\.biz\/oscommerce" [R=301,L]

 

# Begin Ultimate SEO

Options +FollowSymLinks

Options -MultiViews

RewriteEngine on

 

# RewriteBase instructions

# Change RewriteBase dependent on how your shop is accessed as below.

# http://xxxx.biz');

  define('HTTPS_SERVER', 'https://xxxx.biz');

  define('ENABLE_SSL', false);

  define('HTTP_COOKIE_DOMAIN', 'xxxx.biz');

  define('HTTPS_COOKIE_DOMAIN', 'xxxx.biz');

  define('HTTP_COOKIE_PATH', '/oscommerce/');

  define('HTTPS_COOKIE_PATH', '/oscommerce/');

  define('DIR_WS_HTTP_CATALOG', '/oscommerce/');

  define('DIR_WS_HTTPS_CATALOG', '/oscommerce/');

  define('DIR_WS_IMAGES', 'images/');

  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

  define('DIR_WS_INCLUDES', 'includes/');

  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

  define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

  define('DIR_FS_CATALOG', '/home/xxxxxxxxxxxx/public_html/oscommerce/');

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

  define('DB_SERVER', 'xxx.xxx.xxx.xxx');

  define('DB_SERVER_USERNAME', 'xxxxxxx');

  define('DB_SERVER_PASSWORD', 'XXXXXX');

  define('DB_DATABASE', 'XXXXXX');

  define('USE_PCONNECT', 'false');

  define('STORE_SESSIONS', 'mysql');

  // Width and height of the main product_info.php image

  define ( 'KISSIT_MAIN_PRODUCT_IMAGE_WIDTH', 300 );

  define ( 'KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT', 200 );

  define('DIR_WS_CACHE', DIR_WS_INCLUDES . 'cache/');

 

Thank you for your help.

 
Link to comment
Share on other sites

Remove the changes for this addon that you made to the roots .htaccess file. In the shops .htaccess file, change

RewriteBase /oscommerce

to

RewriteBase /oscommerce/

Both the Options +FollowSymLinks and Options -MultiViews can cause problems with the rewrites. If you are still having problems after the above change, try removing them one at a time to see if that helps.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack,

I made those changes, but I am still getting errors when site opens to mysite/ocommerce instead of mysite/oscommerce/index.php.  My site is also even slower now.  Should I have my server change my settings to open my site with mysite/oscommerce/index.php?  As I posted yesterday  my root .htaccess uses this code to redirect to subdirectory: (my site is adult content)

 

RewriteEngine on

 

RewriteCond %{HTTP_HOST} ^couplescorner\.biz$ [OR]

RewriteCond %{HTTP_HOST} ^www\.couplescorner\.biz$

RewriteRule ^/?$ "http\:\/\/couplescorner\.biz\/oscommerce" [R=301,L]

Link to comment
Share on other sites

The code in the roots .htaccess is correct. There shouldn't be any reason why the page won't work without the file name but it may have something to do with how your server is setup. Try adding this line to the top of the .htaccess file in the shops root to see if it helps.

DirectoryIndex index.php

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack,

I put it like this:

 

RewriteEngine on
 
RewriteCond %{HTTP_HOST} ^couplescorner\.biz$ [OR]
RewriteCond %{HTTP_HOST} ^www\.couplescorner\.biz$
RewriteRule ^/?$ "http\:\/\/couplescorner\.biz\/oscommerce" [R=301,L]
DirectoryIndex index.php
 
but it still doesn't open to index.php - should I contact my server, Godaddy to fix this?
Link to comment
Share on other sites

Jack,

I got another suggestion from Mr. Phil - similar to yours:

 

"It sounds like you might have a server misconfiguration, or garbage in your /.htaccess. In .htaccess, do you see a line for "DirectoryIndex"? Does it omit index.php? It should give the entire list of "index" files to look for if only the directory name is given. Usually it's something like

 

DirectoryIndex index.html index.htm index.php

 

If that's not the case, maybe there's a bad or damaged URL rewrite in your .htaccess."

Link to comment
Share on other sites

Jack,

I have also gotten these errors:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/xxxxxxx/public_html/oscommerce/includes/classes/seo.class.php on line 114

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxxx/public_html/oscommerce/includes/classes/seo.class.php:114) in /home/xxxxxxxx/public_html/oscommerce/includes/classes/seo.class.php on line 2890

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxxxx/public_html/oscommerce/includes/classes/seo.class.php:114) in /home/xxxxxxxxx/public_html/oscommerce/includes/classes/seo.class.php on line 2892

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