-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix RewriteRule for subdirectory installation #263
Conversation
The current rule didn't work under a subdirectory for me (I'm not using Zend, just the .htaccess rules for an app of mine). Fix based on: https://github.com/symfony/symfony-standard/blob/680f09b76dd01355a92a209d1926bf54b7aa50f7/web/.htaccess#L18 Thanks @Tobion and @weierophinney for this gem.
|
@weierophinney You could also skip |
public/.htaccess
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to add the slash here. See https://github.com/symfony/symfony-standard/blob/master/web/.htaccess#L41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I missed that.
public/.htaccess
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NC (no case) seems useless as well (same above)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, figured that out when I was cleaning up my own code and came back and made those changes as well as removing the last L flag (@Tobion this might be redundant in symfony as well).
There are no literals in the pattern that requires case insensitivity and the L flag on the last rule is redundant IIUC.
In case developers add custom rules after this. See symfony/symfony-standard#656
|
ping @weierophinney @Ocramius |
|
Does this work in Apache 2.2 and 2.4? |
|
ping @sandeepshetty to clarify @akrabat question |
Fix RewriteRule for subdirectory installation
|
Merged to develop for upcoming 3.0 release. Thanks, @sandeepshetty ! |
The current rule didn't work under a subdirectory for me (I'm not using Zend, just the .htaccess rules for an app of mine). Fix based on: https://github.com/symfony/symfony-standard/blob/680f09b76dd01355a92a209d1926bf54b7aa50f7/web/.htaccess#L18
Thanks @Tobion and @weierophinney for this gem.