Re: Ultimate SEO 2.200 (new features) [Support Thread]
Quote:
Originally Posted by
fcutler4
Hey, guys, I installed Ultimate URLs today successfully, I thought. It's version 2.215 and I'm using zen cart version 1.5.1. The problem is now that NOTHING is showing up when i go to my website. Did I overlook something? Is there a section of this thread anyone can point me to for assistance?
When I visit your website I am seeing a a "HTTP 500 - Internal Server Error".
Most common causes:
- The .htaccess file was placed in the wrong location
- The .htaccess file was not modified to match the store configuration / location
- Errors in one (or both) of the Zen Cart "/includes/configure.php" files
- Files contained in this module were uploaded to the wrong location on the server
- An error occurred when uploading the files to the server
- The Hosting Provider does not allow mod_rewrite on their server
- The Hosting Provider does not allow one or more of the directives required for mod_rewrite in a .htaccess file (such as follow symbolic links, rewrite base, etc)
- The Hosting Provider is using some sort of internal REWRITE to access the web root (sign of a cheap host / host not following best practice)
Please review the link in my signature for troubleshooting "HTTP 500 - Internal Server Error". You may need to work with your hosting provider to gain access to the Apache (or other webserver) error logs for your domain. You may also want to check the Zen Cart "debug" logs for any PHP error messages.
Is your Zen Cart store installed at "/shop/"? If so, was the .htaccess file modified to reflect the store location ("/shop/")? If so, was the .htaccess file uploaded to the correct location ("/shop/")?
Are all of the paths 100% correct in both "/includes/configure.php" and "/your-admin-folder/includes/configure.php"? Can you post (wrap in code tags - press the # button) the lines from those files with: HTTP_*, HTTPS_*, DIR_WS_CATALOG, DIR_WS_HTTPS_CATALOG, DIR_FS_CATALOG, and DIR_FS_LOGS?
Have you tried uploading the module a second time? Ensured all files are placed in the correct location when uploaded? Verified each file was uploaded successfully (and not corrupted)?
Re: Ultimate SEO 2.200 (new features) [Support Thread]
I've installed this for a client after upgrading from 1.3.9. The issue is an existing directory for a point of sale system resulting in a 404. The path is www.STORE.com/pos/index.php
Disabling Ultimate URL does not work. But removing the htaccess file does. There is nothing else in the htaccess except this plugin info. I know it's supposed to ignore real files and directories, but it's not.
Re: Ultimate SEO 2.200 (new features) [Support Thread]
Quote:
Originally Posted by
jeking
I've installed this for a client after upgrading from 1.3.9. The issue is an existing directory for a point of sale system resulting in a 404. The path is "www.STORE.com/pos/index.php". ...
Does this file (or any other file in the 3rd party "pos" code), require or include Zen Cart's "application_top.php"? In versions of Ultimate URLs <= 2.215, Zen Cart "frankenpages" placed inside sub-directories will trigger the "automatic redirects" feature. The temporary workaround is to disable "automatic redirects". This has been corrected in an upstream version (by adding code to detect and exclude "frankenpages" from the "automatic redirect" processing).
Does a file exist named "/pos.php", "/pos.html", "/pos.jpg", or anything else matching "/pos.*"? This is probably not the issue, but if a file does exist, you may need to disable Apache "MultiViews" by adding the following to your ".htaccess" file.
Code:
Options -MultiViews
Quote:
Originally Posted by
jeking
... Disabling Ultimate URL does not work. But removing the htaccess file does. There is nothing else in the htaccess except this plugin info. I know it's supposed to ignore real files and directories, but it's not.
The last generic "catch all" rule in the .htaccess will ignore directories and files which do not physically exist. This is handled by Apache directly, not Zen Cart or Ultimate URLs. Issues here would point to a server configuration issue (or issues with other Apache server directives).
However if the 3rd party "pos" code uses the same URL schemes (ending with the same "anchors" - ex: -p-123, -c-123, -ezp-123, etc), the preceding rules are applied (including to physically existing resources). If for some reason the 3rd party "pos" code does use URLs matching the same format as Ultimate URLs, you can exempt the "pos" folder from the rules added by Ultimate URLs.
Code:
###############################################################################
# Start Ultimate (SEO) URLs
###############################################################################
# Notes:
#
# You should not make any changes in this section unless you really understand
# how it will impact your web site. Mistakes can break things.
###############################################################################
# Skip Ultimate URLs directives for specific requests
RewriteCond %{REQUEST_URI} ^/pos/
RewriteRule .* - [S=12]
# Handles the new URL formats
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-p-([0-9]+)(.*)$ index\.php?main_page=product_info&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-pi-([0-9]+)(.*)$ index\.php?main_page=popup_image&pID=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-pr-([0-9]+)(.*)$ index\.php?main_page=product_reviews&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-pri-([0-9]+)(.*)$ index\.php?main_page=product_reviews_info&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
# Original (unchanged) URL formats
RewriteRule ^(.*)-p-([0-9]+)(.*)$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-m-([0-9]+)(.*)$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pi-([0-9]+)(.*)$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pr-([0-9]+)(.*)$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pri-([0-9]+)(.*)$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-ezp-([0-9]+)(.*)$ index\.php?main_page=page&id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)(.*)$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
# Rewrite all other requests (if the file / directory does not exist)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=$1&%{QUERY_STRING} [L]
NOTE: The above examples are intended for the ".htaccess" file provided with Ultimate URLs 2.215. If you are running a different version, you may need to adjust the rules to correctly skip the correct number of RewriteRule directives in your ".htaccess" file.
Re: Ultimate SEO 2.200 (new features) [Support Thread]
This is version 2.215. But I overlooked an obvious cause. The htaccess on the /pos/ folder was the cause of the problem. The folder is password protected and even though it looked good, commenting out those lines fixed the problem. I'll figure out why, but the problem is not Ultimate URL.
Re: Ultimate SEO 2.200 (new features) [Support Thread]
Please update this mod with the new copy of includes/functions/html_output.php
from the November 2015 patches
https://www.zen-cart.com/showthread....-November-2015
Re: Ultimate SEO 2.200 (new features) [Support Thread]
For those installing Ultimate URLs on a patched copy of Zen Cart, the installer will leave the patches alone and automatically handle merging only the required changes to "/includes/functions/html_output.php".
If one overwrites their copy of "/includes/functions/html_output.php" with a patched copy, be sure to run the Ultimate URLs installer again (to add the required changes).
For those who choose to manually merge the changes required for Ultimate URLs (not recommended), be sure to also incorporate the above security bugfix kindly posted by swguy in this thread.
Re: Ultimate SEO 2.200 (new features) [Support Thread]
There is a search Bug in Ultimate Seo 2.15
I have added Advanced_search_result in the pages to have Seo urls. It works fine if we search for one word but if we search for 2 words the search page 1 works fine but on clicking page 2 we are taken to advanced search page. On checking the url difference I found this:
First page url: advanced_search_result.html?search_in_description=1&keyword=kelvin clean
Search page 2 url: index.php?main_page=advanced_search&search_in_description=1&keyword=kelvin clean&inc_subcat=0&sort=20a&page=2
The problem is advance_search_result has changed to advanced_search
If we disable ultimate seo everything works fine
Re: Ultimate SEO 2.200 (new features) [Support Thread]
Quote:
Originally Posted by
manishanirula
... I have added Advanced_search_result in the pages to have Seo urls. It works fine if we search for one word but if we search for 2 words the search page 1 works fine but on clicking page 2 we are taken to advanced search page. ...
Correct. There are a number of things at play here, but the root cause is a double encoding of the URLs on the "search pages".
The quickest fix is to just disable generating alternative URLs for "advanced_search_result".
Upon initial installation Ultimate URLs enabled generation of alternate URLs for "index, product_info, product_music_info, document_general_info, document_product_info, product_free_shipping_info, products_new, products_all, shopping_cart, featured_products, specials, contact_us, conditions, privacy, reviews, shippinginfo, faqs_all, site_map, gv_faq, discount_coupon, page, page_2, page_3, page_4". This is the recommended setting for most sites.
A slightly more complex fix (allowing generation of alternative URLs for the search result pages) involves making changes to "/includes/classes/usu.php".
Replace:
Code:
/**
* Convert an array of query parameters to a URI query string. This is safe
* for use under 5.2+ with optimizations for PHP 5.4+.
*
* @param array the array of query parameters
*/
protected function build_query($parameters) {
if(version_compare(PHP_VERSION, '5.4.0') >= 0) {
$parameters = http_build_query($parameters, '', '&', PHP_QUERY_RFC3986);
}
else {
$compile = array();
foreach($parameters as $key => $value) {
if($key !== null && $key != '') {
// Prior to PHP 5.3, tildes might be encoded per RFC 1738
// This should not impact functionality for 99% of users.
$compile[] = rawurlencode($key) . '=' . rawurlencode($value);
}
}
$parameters = implode('&', $compile);
unset($compile);
}
return $parameters;
}
With:
Code:
/**
* Convert an array of query parameters to a URI query string. This requires
* the code calling zen_href_link() to ensure all parameters passed to the
* function to be already encoded when applicable.
*
* @param array the array of query parameters
*/
protected function build_query($parameters) {
$compile = array();
foreach($parameters as $key => $value) {
if($key !== null && $key != '') {
$compile[] = $key . '=' . $value;
}
}
return implode('&', $compile);
}
NOTE: Those with third party code assigning arrays (as the value) for a key in the URL parameters (not recommended) will need to apply additional changes to the function.
Re: Ultimate SEO 2.200 (new features) [Support Thread]
Thanks...Its working fine now but would you suggest making the above changes. Will it impact anything else on website.
Re: Ultimate SEO 2.200 (new features) [Support Thread]
Also is there a way to remove the query string "advanced_search_result.html?search_in_description=1&keyword=" from the url of search. This will be really helpful in SEO