Details
-
Bug
-
Resolution: Obsolete
-
Medium
-
None
-
None
-
None
Description
I have in my site.ini:
[SiteSettings]
DefaultAccess=en
[SiteAccessSettings]
RemoveSiteAccessIfDefaultAccess=enabled
As a result, as expected, the siteAccess is not included in the url when I surf on the default siteAccess
However if I type by hand the url: http://www.domain.com/en/my-link, the link is correct, I'm not redirected.
As a result, I'm on an URL where the default siteAccess is included, it's not removed as asked by RemoveSiteAccessIfDefaultAccess=enabled
index.php should perform a redirect to the url:
http://www.domain.com/my-link
For now, I've added a crappy patch in my index.php to correct this bad behavior, waiting for a better solution...
at around line 340, after the code:
$access = eZSiteAccess::match( $uri, eZSys::hostname(), eZSys::serverPort(), eZSys::indexFile() ); $access = eZSiteAccess::change( $access ); eZDebugSetting::writeDebug( 'kernel-siteaccess', $access, 'current siteaccess' );
I've added the code:
if ( $ini->variable( 'SiteAccessSettings', 'RemoveSiteAccessIfDefaultAccess' ) == "enabled" && $access["name"] == $ini->variable( 'SiteSettings', 'DefaultAccess' ) && !empty($access["uri_part"]) ) { $redir = $uri->attribute("original_uri"); eZURI::transformURI($redir); eZHTTPTool::redirect($redir); eZExecution::cleanExit(); }
Attachments
Issue Links
- relates to
-
EZP-17850 Avoid content duplication penalty by Google (correction code inside this post)
- Open