0

I wonder if there is a way to add trailing slashes to the standard URLs generated by ExpressionEngine?

I'm not looking for some .htaccess rewrites but for a way to have slash appended in the first place.

Background is, that I'm migrating a site from EE1 (which had the default trailing slash, in case you remember) and there are thousands of entries with ten thousands of facebook-likes, google-plusses and whatnot that are to be preserved. So the URLs cannot change.

1

Depends on what template code you are using to craft the URLs. (I'm not sure about doing it at a DB level)

For example you could use:

{exp:channel:entries ... }
  ...
  <a href="{site_url}channel/{url_title}/" >Link</a>
{/exp:channel:entries}

Or if {url_title_path} doesn't add a /, add one yourself:

{exp:channel:entries ... }
  ...    
  <a href="{url_title_path='channel'}/">Link</a>
{/exp:channel:entries}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.