Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PATCH - Small changes to the generated .htaccess file #1300

Closed
ozh opened this issue Apr 6, 2013 · 0 comments
Closed

PATCH - Small changes to the generated .htaccess file #1300

ozh opened this issue Apr 6, 2013 · 0 comments

Comments

@ozh
Copy link
Member

ozh commented Apr 6, 2013

This is a COPY of Issue 1300: PATCH - Small changes to the generated .htaccess file, filed on Google Code before the project was moved on Github.

Please review the original issue and especially its comments. Comments here on closed issues will be ignored. Thanks.

Original description

The generated htaccess file contains a couple of inefficiencies.

1) Rewrites are enclosed in a <IfModule> block. Since the code doesn't work without mod_rewrite, we *want* it to fail if mod_rewrite is absent, not silently ignore our configuration and cause confusion. Thus, patch removes the <IfModule> stuff.

2) The RewriteRule has a (.*) in it, which is unnecessary. (.*) captures a match in a backreference for later use. We're not using that backreference, so this just adds memory and time overhead on every request. Granted, it's not much, but there it is.

(Note: Yes, these changes are trivial, but mod_rewrite inefficiency bugs me.)

(Note 2: The entire .htaccess file can be replaced with a single "FallBackResource $path/yourls-loader.php" if you're running Apache 2.2.16 or later.)
@ozh ozh closed this as completed Apr 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant