demianturner / sgl-docs-tickets-migration-test

0 stars 0 forks source link

SiteMap URL Issue #1715

Open demianturner opened 11 years ago

demianturner commented 11 years ago

if conf[site][frontScriptName] = ' ' then http://www.acme.com/sitemap with take you to a directory listing, http://www.acme.com/sitemap/sitemap will return the site map XML.

if conf[site][frontScriptName] = 'index.php' then http://www.acme.com/index.php/sitemap will return the site map XML.

I assume that http://www.acme.com/sitemap should work.

demianturner commented 11 years ago

[demian] The directory listing issue is the only error i can see here, and it sounds like symlinks and/or apache are not setup properly - this is not a Seagull prob.

demianturner commented 11 years ago

[malber] The .htaccess file is based on htaccess-cleanUrl.dist

{{{

disable the server signature

ServerSignature Off

set the default character set

AddDefaultCharset UTF-8

############################################

enable rewrites

Options +FollowSymlinks
RewriteEngine on

sample redirect to www.domain.com

RewriteCond %{HTTPHOST} ^bearvalleyhaven.com [NC] RewriteRule ^(.)$ http://www.bearvalleyhaven.com/$1 [L,R=301] RewriteCond %{HTTPSHOST} ^bearvalleyhaven.com [NC] RewriteRule ^(.)$ https://www.bearvalleyhaven.com/$1 [L,R=301]

############################################

always send 404 on missing files in these folders

RewriteCond %{REQUEST_URI} !^/.*(themes|wysiwyg|images|js)/

############################################

always send 404 on missing favicon

RewriteRule ^favicon.ico$ favicon.ico [L]

############################################

never rewrite for existing files, directories and links

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

############################################

rewrite everything else to index.php

RewriteRule .* index.php

}}}

demianturner commented 11 years ago

[demian] ok cool, so sounds like there's a prob, i will look into it when i get the chance.

demianturner commented 11 years ago

[malber] I figured out the problem, but not a solution. If conf[site][frontScriptName] = ' ' and htaccess-cleanUrl.dist is used then "never rewrite for existing files, directories and links" is true ... for modules such as Media2 and SiteMap a link / folder is created in the www folder, ie. www/media2 and www/sitemap. So when the url is http://www.acme.com/sitemap the ''RewriteRule .* index.php'' rule is never fired, instead the contents of the sitemap folder are displayed.

demianturner commented 11 years ago

[malber] Removing {{{ RewriteCond %{REQUEST_FILENAME} !-d }}}

Fixes this problem, but I do not know if that will cause other issues.

demianturner commented 11 years ago

[demian] interesting, let me give it a try. a reply is coming to your emails on ML, been quite tied up with projects.