Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Add a cookbook entry about url trailing slash redirect #323

Merged
merged 1 commit into from
Nov 8, 2013

Conversation

EmmanuelVella
Copy link
Contributor

Q A
Doc fix? no
New docs? yes
Applies to all
Fixed tickets none

Discussed in this mailing list topic : https://groups.google.com/forum/#!topic/symfony-cmf-devs/USBi-njDmk4

Redirect URLs with a trailing slash
===================================

.. include:: _outdate-caution.rst.inc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is outdated, is it?

@EmmanuelVella
Copy link
Contributor Author

I'm updating the PR. But I finally have an issue with the action, it does not work as expected. I'm trying to find out why.

@EmmanuelVella
Copy link
Contributor Author

Thanks for your feedback. I've juste pushed the updates.

The problem I had was caused by the JMSI18nRoutingBundle. I had to add the i18n: false option to make it work correctly. Should I add a note about this ?

@wouterj
Copy link
Member

wouterj commented Nov 8, 2013

All lines should be wrapped at the 72th character.

@wouterj
Copy link
Member

wouterj commented Nov 8, 2013

The problem I had was caused by the JMSI18nRoutingBundle. I had to add the i18n: false option to make it work correctly. Should I add a note about this ?

I think it's an edge case. Unless we get a lot of reports from people having this problem I prefer to not document it.

@wouterj
Copy link
Member

wouterj commented Nov 8, 2013

Could you please add the PR template to your PR description?

@EmmanuelVella
Copy link
Contributor Author

Done !


.. note::

For the moment, the :doc:`RoutingBundle <../bundles/routing/introduction>` can't achieve this automatically.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, you forgot to wrap this line :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahah ! Should I wrap it before the :doc: ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just after it is fine

@EmmanuelVella
Copy link
Contributor Author

It should be ok ;)

wouterj added a commit that referenced this pull request Nov 8, 2013
Add a cookbook entry about url trailing slash redirect
@wouterj wouterj merged commit 629497b into symfony-cmf:master Nov 8, 2013
@EmmanuelVella EmmanuelVella deleted the trailing-slash-cookbook branch November 8, 2013 15:12
@EmmanuelVella
Copy link
Contributor Author

🍻 Thanks !

wouterj added a commit that referenced this pull request Nov 8, 2013
@wouterj
Copy link
Member

wouterj commented Nov 8, 2013

Thank you for creating the first tips & tricks article for the CMF!

I've done some minor changes in c66b030 , mainly to move it to a section.

@EmmanuelVella
Copy link
Contributor Author

You're welcome, thank you for your help !

@wouterj
Copy link
Member

wouterj commented Nov 12, 2013

@EmmanuelVella I thought a bit about this, and maybe it's better to move it to the core docs, as it's not a cmf specific article and it's a common problem. You can just copy the file to the symfony docs (remove the note about the RoutingBundle), update their toctrees and request a PR. Then also request a PR here which removes the article and it's references. I'll keep an eye on both PRs and merge it when to other is merged too.

@dbu
Copy link
Member

dbu commented Nov 13, 2013

oh, indeed. searching for "symfony2 trailing slash" in google brings forth a ton of stack overflow and other places where people ask for this and sometimes get ok answers, sometimes bad ones. (i.e. leading to serve the same content under multiple URLs which is a no-no if you want google to like you).

so moving this to symfony core doc sounds like a valid idea.

@EmmanuelVella
Copy link
Contributor Author

Hi, I just submitted a PR in the symfony cookbook. I will submit another PR here to remove the cookbook entry when the first one will be merged !

@wouterj
Copy link
Member

wouterj commented Nov 13, 2013

just already submit the PR here. I'll merge it when the upstream PR is merged too.

@EmmanuelVella
Copy link
Contributor Author

Ok, let me just do it then I submit it.

@EmmanuelVella
Copy link
Contributor Author

Done !

@wouterj
Copy link
Member

wouterj commented Nov 13, 2013

thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants