Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit 507a3f9

Browse files
committed
merged branch Tobion/patch-2 (PR #497)
This PR was merged into the 2.2 branch. Commits ------- 99106de added info about changed .htaccess b46c01a removed QSA flag that is not needed 7da3383 redirect /app.php to prevent duplicate content Discussion ---------- redirect /app.php to prevent duplicate content bc break: no fix #469 --------------------------------------------------------------------------- by Tobion at 2013-02-22T12:43:02Z @fabpot finished and tested. --------------------------------------------------------------------------- by vicb at 2013-02-22T12:59:01Z What about removing the L flag altogether ? --------------------------------------------------------------------------- by Tobion at 2013-02-22T13:00:53Z Right we can do that because END includes L > Using the [END] flag terminates not only the current round of rewrite processing (like [L]) ... --------------------------------------------------------------------------- by Tobion at 2013-02-22T13:12:06Z @vicb done.
2 parents de036c8 + 99106de commit 507a3f9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

UPGRADE-2.2.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
UPGRADE FROM 2.1 to 2.2
22
=======================
33

4+
* The [`web/.htaccess`](https://github.com/symfony/symfony-standard/blob/2.2/web/.htaccess)
5+
file changed slightly to prevent duplicate content with and without `/app.php` in the URI.
6+
So you might want to update your `.htaccess` file as well.
7+
48
* The ``_internal`` route is not used any more. It should then be removed
59
from both your routing and security configurations. A ``framgents`` key has
610
been added to the framework configuration and must be specified when ESI or

web/.htaccess

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
# RewriteBase /
66
#</IfModule>
77

8+
# redirect to URI without front controller to prevent duplicate content
9+
RewriteRule ^app\.php(/(.*)|$) /$2 [R=301,END]
10+
11+
# rewrite requests to non-existent files to front controller
812
RewriteCond %{REQUEST_FILENAME} !-f
9-
RewriteRule ^(.*)$ app.php [QSA,L]
13+
RewriteRule ^(.*)$ app.php [END]
1014
</IfModule>

0 commit comments

Comments
 (0)