Posts for 19th June 2016

It appears Stacey 3.0.0 has issues with generating urls for child pages on some occasions. When this problem is encountered, Stacey appends additional trailing slashes onto the child URLs, which when followed results in the URLs of internal site links in the destination page being incorrectly rooted.

Rather than delve into the guts of this system, a quick and dirty work-around can be gained by editing the root .htaccess file. The following entries should resolve the problem:

# Remove multiple slashes after domain
RewriteCond %{THE_REQUEST} ^[A-Z]+\s//+(.*)\sHTTP/[0-9.]+$ [OR]
RewriteCond %{THE_REQUEST} ^[A-Z]+\s(.*/)/+\sHTTP/[0-9.]+$
RewriteRule .* %{ENV:proto}://%{HTTP_HOST}/%1 [R=301,L]

# Remove multiple slashes anywhere in URL
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]