It may be that having switched hosts to a windows install of modx maybe the problem. Thanks It does work when not using friendly urls.
Below is the htaccess file:
# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.48
RewriteEngine On
RewriteCompatibility2 On
RepeatLimit 32
RewriteBase
# Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule ^/httpd(?:\.ini|\.parse\.errors).*$ / [NC,F,O]
# Block external access to the Helper ISAPI Extension
RewriteRule ^.*\.isrwhlp$ / [NC,F,O]
RewriteRule ^/(?!(?:manager|assets)/)(.*)\.html(?:\?(.*))?$ /index.php?q=$1?2&$2: [NC,L,U]
RewriteCond %{HTTP_HOST} .
RewriteCond Host: (?!www\.)(.+)
RewriteRule (.+) http\://www.example.com$1 [I,RP]
I’ve found on IIS6 with furl’s the first character after.html needs to be an ?
If an & is used it causes a 404 error.
-
☆ A M B ☆
- 24,524 Posts
That is the case with any server. Some are just more forgiving about it than others.
With friendly URLs, you need to use a ? for your first custom query string pair:
mypage.html?key=value&key2=value2
But without friendly URLs you cannot use a ? because it’s already in use
index.php?id=42&key=value&key2=value2
Thanks all for the swift response. Changing the & to a ? worked
-
☆ A M B ☆
- 24,524 Posts
Any snippet that generates links with query string arguments should have a check for whether or not friendly URLs is in use, and set the character to use accordingly. The setting to check for is $modx->config[’friendly_urls’]; if it’s 1 then use ? if it’s 0 then use &.
$firstarg = $modx->config['friendly_urls'] ? '?' : '&';
should do the trick.
-
☆ A M B ☆
- 24,524 Posts
and the beauty of that is that if you need to change from friendly URLs to not (or vice versa) for some reason, it’ll still work.