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

Conversation

@sandeepshetty
Copy link
Contributor

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.

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.
@sandeepshetty
Copy link
Contributor Author

@weierophinney You could also skip RewriteCond %{REQUEST_FILENAME} -d to improve performance.

public/.htaccess Outdated
Copy link

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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
Copy link

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)

Copy link
Contributor Author

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
@samsonasik
Copy link
Contributor

ping @weierophinney @Ocramius

@akrabat
Copy link
Contributor

akrabat commented Jun 11, 2015

Does this work in Apache 2.2 and 2.4?

@samsonasik
Copy link
Contributor

ping @sandeepshetty to clarify @akrabat question

weierophinney added a commit that referenced this pull request Jun 15, 2016
Fix RewriteRule for subdirectory installation
weierophinney added a commit that referenced this pull request Jun 15, 2016
@weierophinney
Copy link
Member

Merged to develop for upcoming 3.0 release. Thanks, @sandeepshetty !

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.

5 participants