Re: Page 404 Error on Currency Selection
Let's get rid of the effects of that SEFU mod so it's not involved in busting that sidebox:
Choose one:
a) put back the original html_output.php file
or
b) edit the one you're currently using, as shown:
change this:
Code:
/ SEO URLs zen_href_link replacement
function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
// not all core scripts (such as the Paypal IPN handler) implement the core auto loader system (WTF!?)
if (!isset($GLOBALS['SeoUrl'])) {
require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'seo/seo.url.php');
$GLOBALS['SeoUrl'] =& new SeoUrl($GLOBALS['db']);
$GLOBALS['SeoUrl']->setupLanguage($_SESSION['languages_id']);
}
return $GLOBALS['SeoUrl']->buildHrefLink($page, $parameters, $connection, $add_session_id, $static, $use_dir_ws_catalog);
}
function zen_href_link_stock($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
global $request_type, $session_started, $http_domain, $https_domain;
to this:
Code:
/ SEO URLs zen_href_link replacement
function zen_href_link_SEFU($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
// not all core scripts (such as the Paypal IPN handler) implement the core auto loader system (WTF!?)
if (!isset($GLOBALS['SeoUrl'])) {
require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'seo/seo.url.php');
$GLOBALS['SeoUrl'] =& new SeoUrl($GLOBALS['db']);
$GLOBALS['SeoUrl']->setupLanguage($_SESSION['languages_id']);
}
return $GLOBALS['SeoUrl']->buildHrefLink($page, $parameters, $connection, $add_session_id, $static, $use_dir_ws_catalog);
}
function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
global $request_type, $session_started, $http_domain, $https_domain;
Now what happens to the currency box?
Of course, if you have the SEFU mod enabled, it's going to break everything by doing this.
Re: Page 404 Error on Currency Selection
Quote:
Originally Posted by
DrByte
Quote:
Originally Posted by
blag
yes, disabling SEFU mod (Ultimate_SEO_URLs_v2.105) does allow the currency to be set without problems
Can you assist me in sorting out how to make the currency selector work when Ultimate_SEO_URLs_v2.105 is enabled?
You will find some discussion by various folks in that module's support thread for things you might try.
I'm convinced that the SEFU/SEO-URL mod is the problem. That mod (and the others like it) have various known problems.
The problem could be with your Rewrite Rules (and I'm also convinced that you have problems there anyway), or it could be with the URL that is being generated for the sidebox form action. I don't know. I leave that to the folks to have a passion for those things.
Re: Page 404 Error on Currency Selection
1. From your configure.php files, it appears that www.ho-hose.net is your primary domain:
Quote:
Originally Posted by
blag
define('HTTP_SERVER', 'http://www.ho-hose.net');
define('DIR_WS_CATALOG', '/store/');
define('DIR_FS_CATALOG', '/home/hohose/public_html/store/');
2. However, going to http://www.ho-hose.net/store is presently taking you to http://ho-hose.co.uk/store/ in the browser address bar.
This is most likely because of your RewriteRules ... which in my opinion probably should *not* be pointing to .co.uk, but rather to .net
3. The fact that the page at http://ho-hose.co.uk/store/ displays any content is a result of your domain sharing/redirect set up by your host.
4. Search engines seeing this behaviour will probably cross you off their list at this point.
5. The currency sidebox is building the form action URL from the data in your configure.php file, and (almost) correctly producing a link to: http://www.ho-hose.net/store/?currency=USD (or EUR or GBP based on selection)
6. However, since your RewriteRules are telling all of your .net traffic to convert to .co.uk addresses, it fails -- presumably because it cannot also pass the URL parameters during its redirect.
7. If the SEFU mod weren't installed, it would generate the URL for the sidebox a little differently ... by including the index.php portion of the URL, which it leaves out (see link in #5 above). Without the SEFU mod active, it produces this:
http://www.ho-hose.net/store/index.php?currency=USD ... which works fine.
This is further confirmation that the RewriteRules you're currently using are stripping too much off the URL when doing their redirects.
Most likely your rules are doing blind redirects without evaluating the entire URI before rewriting the URL.
Re: Page 404 Error on Currency Selection
Quote:
Originally Posted by
blag
Code:
# EZ Pages from Ultimate Seo Urls version 2.1 to 3.X
RewriteRule ^page.html$ index\.php?main_page=page&%{QUERY_STRING} [L,R=301]
# Seo Urls version 3.x
# Don't rewrite real files or directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index\.php?seo_url=$1&%{QUERY_STRING} [L]
Why do your .htaccess files mention SEO URLs v3 when you said you're using v2.105?
Quote:
Originally Posted by
blag
SEFU mod (Ultimate_SEO_URLs_v2.105)
Re: Page 404 Error on Currency Selection
What happens to your currency sidebox if you remove this section from your .htaccess?
Code:
RewriteCond %{HTTP_HOST} ^ho-hose.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.ho-hose.net$
RewriteRule ^(.*)$ /store/index.php [R=301,L]
Re: Page 404 Error on Currency Selection
Quote:
Originally Posted by
DrByte
Let's get rid of the effects of that SEFU mod so it's not involved in busting that sidebox:
Choose one:
a) put back the original html_output.php file
or
b) edit the one you're currently using, as shown:
change this:
Code:
/ SEO URLs zen_href_link replacement
function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
// not all core scripts (such as the Paypal IPN handler) implement the core auto loader system (WTF!?)
if (!isset($GLOBALS['SeoUrl'])) {
require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'seo/seo.url.php');
$GLOBALS['SeoUrl'] =& new SeoUrl($GLOBALS['db']);
$GLOBALS['SeoUrl']->setupLanguage($_SESSION['languages_id']);
}
return $GLOBALS['SeoUrl']->buildHrefLink($page, $parameters, $connection, $add_session_id, $static, $use_dir_ws_catalog);
}
function zen_href_link_stock($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
global $request_type, $session_started, $http_domain, $https_domain;
to this:
Code:
/ SEO URLs zen_href_link replacement
function zen_href_link_SEFU($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
// not all core scripts (such as the Paypal IPN handler) implement the core auto loader system (WTF!?)
if (!isset($GLOBALS['SeoUrl'])) {
require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'seo/seo.url.php');
$GLOBALS['SeoUrl'] =& new SeoUrl($GLOBALS['db']);
$GLOBALS['SeoUrl']->setupLanguage($_SESSION['languages_id']);
}
return $GLOBALS['SeoUrl']->buildHrefLink($page, $parameters, $connection, $add_session_id, $static, $use_dir_ws_catalog);
}
function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
global $request_type, $session_started, $http_domain, $https_domain;
Now what happens to the currency box?
Of course, if you have the SEFU mod enabled, it's going to break everything by doing this.
I get the same result: the currency doesn't change
Re: Page 404 Error on Currency Selection
Quote:
Originally Posted by
DrByte
Why do your .htaccess files mention SEO URLs v3 when you said you're using v2.105?
Now, that is a very good question: I'll take a look into that.
Re: Page 404 Error on Currency Selection
Quote:
Originally Posted by
DrByte
What happens to your currency sidebox if you remove this section from your .htaccess?
Code:
RewriteCond %{HTTP_HOST} ^ho-hose.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.ho-hose.net$
RewriteRule ^(.*)$ /store/index.php [R=301,L]
Thecurrency box tries to take me to
but that gives a Page 404 error.
Re: Page 404 Error on Currency Selection
Quote:
Originally Posted by
DrByte
Why do your .htaccess files mention SEO URLs v3 when you said you're using v2.105?
I removed the statement from the .htaccess file, but, damnation, I don't see any change in the behaviour!
Re: Page 404 Error on Currency Selection
Quote:
Originally Posted by
DrByte
1. From your configure.php files, it appears that
www.ho-hose.net is your primary domain:
2. However, going to
http://www.ho-hose.net/store is presently taking you to
http://ho-hose.co.uk/store/ in the browser address bar.
This is most likely because of your RewriteRules ... which in my opinion probably should *not* be pointing to .co.uk, but rather to .net
3. The fact that the page at
http://ho-hose.co.uk/store/ displays any content is a result of your domain sharing/redirect set up by your host.
4. Search engines seeing this behaviour will probably cross you off their list at this point.
5. The currency sidebox is building the form action URL from the data in your configure.php file, and (almost) correctly producing a link to:
http://www.ho-hose.net/store/?currency=USD (or EUR or GBP based on selection)
6. However, since your RewriteRules are telling all of your .net traffic to convert to .co.uk addresses, it fails -- presumably because it cannot also pass the URL parameters during its redirect.
7. If the SEFU mod weren't installed, it would generate the URL for the sidebox a little differently ... by including the index.php portion of the URL, which it leaves out (see link in #5 above). Without the SEFU mod active, it produces this:
http://www.ho-hose.net/store/index.php?currency=USD ... which works fine.
This is further confirmation that the RewriteRules you're currently using are stripping too much off the URL when doing their redirects.
Most likely your rules are doing blind redirects without evaluating the entire URI before rewriting the URL.
ho-hose.net is not my primary domian. ho-hose.co.uk is supposed to be my primary domain for my current non-ZC domain. This domain's files live in the root folder on the host.
ho-hose.net is a domain that I use for my ZC stor testing purposes, and it lives in a subdirectory on the host server. The host has set up a redirect for me.
I had assumed that the redirect would be 'transparent' to the user, and that all URL's would contain references to the .net domain. ON this assumption I set my configure files such that they see .net as the domain in which the store lives - because the domain should be .net as a result of the redirect.
So, if we abandon the .net redirect, and set the configure files to point at ho-hose.co.uk/store, and we point the browser to the index.php file in the store subdirectory, would it be reasonable to expect the store to work, because we have eliminated any URL reference to the .net domain?
Or do I have to set the configure file to ho-hose.co.uk/store/index.php, because if you type www.ho-hose.co.uk/store/ (i.e without the index.php) a page 404 error is generated?