I can’t get urls to be case insensitive.
The friendly url part is working by going to the document-alias, but the RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC] in the .htaccess file is not working.
I’ve tried to add in the following plugin -
/**
* A MODx plugin to redirect URLs with incorrect case to actual URL.
*/
$alias= null;
if ($modx->config[’friendly_alias_urls’] == 1) {
if (($modx->config[’use_alias_path’] == 1 && $modx->documentMethod == ’alias’ && $modx->event->name == ’OnPageNotFound’)) {
$alias= (strlen($modx->virtualDir) > 0 ? $modx->virtualDir . ’/’ : ’’) . $modx->documentIdentifier;
}
elseif ($modx->event->name == ’OnWebPageInit’) {
$alias= $modx->getDocumentIdentifier(’alias’);
}
}
if ($alias) {
if (!isset ($modx->documentListing[$alias])) {
$documentListingNC= array_change_key_case($modx->documentListing);
if (isset ($documentListingNC[strtolower($alias)])) {
$actualDocId= $documentListingNC[strtolower($alias)];
$modx->sendRedirect($modx->makeUrl($actualDocId), 0, ’’, ’HTTP/1.0 301 Moved Permanently’);
exit();
}
}
with ’OnWebPageInit’ and ’OnPageNotFound’ check in the System Events Tab. This did not work either.
The ’Configuration/Friendly URLS’ are set as follows:
Use friendly URLS: Yes
Prefix for friendly URLS: blank
Suffix for friendly URLS: blank
Use friendly aliases: Yes
Use friendly alias path: No
Allow duplicate aliases: No
Automatically generate alias: No
ModX Version - 0.9.6.2
Any help would be greatly appreciated! Thanks!
I’m having a similar problem, any help appreciated:
I can’t get urls to be case insensitive.
The friendly url part is working by going to the document-alias, but the RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC] in the .htaccess file is not working.
I’m using Evolution 1.0.0
im also having this issue on evoution 1.0.2 from an upgraded 0.9.6.2
The ’Configuration/Friendly URLS’ are set as follows:
Use friendly URLS: Yes
Prefix for friendly URLS: blank
Suffix for friendly URLS: .html
Use friendly aliases: Yes
Use friendly alias path: No
Allow duplicate aliases: No
Automatically generate alias: Yes
the Trans alias plugin is enabled, and future URL’s will not have this issue but existing ones that use uppercase are not working, i have tried the plugin even putting die(); in there has no effect.
OnWebPageInit CHECKED
OnPageNotFound CHECKED
the rewrite rule in htaccess has
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
I found this:
http://modxcms.com/forums/index.php/topic,39009.msg235246.html#msg235246
[Update: I installed the final version of the plugin in that thread at Bob’s Guides and it seems to work.]