0 users online. Create an account or sign in to join them.Users


Symphony's issue tracker has been moved to Github.

Issues are displayed here for reference only and cannot be created or edited.


Closed#128: .htaccess file is missing the trailing slash rule

In Symphony 2.0.6. the .htaccess file is missing the trailing slash rule:

### CHECK FOR TRAILING SLASH - Will ignore files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ /$1/ [L,R=301]

The rule must be placed after the image rules, which means in the “Symphony - do not edit” part of the .htaccess file. This means that adding it manually would be problematic (because it might be removed by updater scripts). So the Symphony installer and updater scripts should care for this rule.

Forum discussion is here.

The decision is to enforce trailing slash. Reasons:

  1. Google does this.
  2. It’s easier to comment out the enforce line than to write one if none exist.

Trailing slash rule added back in to .htaccess when installing. Closed by 20e8b7b6066adfaaf4a941d63e2c30a52c8e5a46

Allen, just out of curiosity: What do you mean by “Google does this”?

If you type: http://google.com (without the trailing slash), the domain redirects to http://google.com/

Ah, I see.

If you use Apache the trailing slash is unavoidable for the web root anyway. This is why I like the trailing slash for pages in Symphony. But actually Google does not use a trailing slash for their content pages. This link will take you to the image search, for example, and no slash will be added:


A stupid moment for me, of course domain root enforces trailing slash!

Due to the fact that Symphony always behaved with enforcing trailing slash, and that the removal of this rule had not been properly sanctioned, the trailing slash rule should go back in.

We may look at offering an option during install for user’s desired behaviour at a later date. For now, those who want the system to not enforce a rule can manually comment out the rule on their .htaccess.

Trailing slash rule added back in to .htaccess when installing.

lol, what about who doesn’t want trailing slash rule?

@rainerborene: If you comment it out, Symphony will work with or without the trailing slash (like 2.0.6 does). You might as well develop a “non-trailing-slash” rule! :-)

@michael-e Not the ideal solution but works.

We may look at offering an option during install for user’s desired behaviour at a later date.

I think this feature should come in the next release. Did you see the related discussion? Some people agree and some not.

Yes, this would be a nice feature. But I don’t think this a a priority 1 task. So Allen’s answer is OK for me.

Yes, I have read the discussion. We’ve not planned for the additional option for the installer for the next release.

We can all agree that enforcing a rule is important, having two URL to the same page is bad form. The reason behind sticking with trailing slash is because the removal of the trailing slash rule was not properly sanctioned, it was an unintended behaviour as far as following proper update protocols were concerned.

This issue is closed.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details