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

hdd.htaccess #157

Open
Georg-Git opened this issue Aug 30, 2018 · 1 comment
Open

hdd.htaccess #157

Georg-Git opened this issue Aug 30, 2018 · 1 comment

Comments

@Georg-Git
Copy link

cachify/inc/setup/cachify.hdd.htaccess.php:

1.) main rules: for every non cachify file (e.g js, css, jpg...) existing of this files inside cachify path is checked!

2.) I miss some escapings in rewrite conditions

My proposal for the # Main Rules:

# Main Rules
RewriteCond %{ENV:CACHIFY_DIR} !^$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{REQUEST_URI} !^\/(wp\-admin|wp\-content\/cache)\/.*
RewriteCond %{HTTP_COOKIE} !(wp\-postpass|wordpress_logged_in|comment_author)_
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/cachify/%{ENV:CACHIFY_HOST}%{ENV:CACHIFY_DIR}index.html%{ENV:CACHIFY_SUFFIX}-f
RewriteRule ^(.*) /wp-content/cache/cachify/%{ENV:CACHIFY_HOST}%{ENV:CACHIFY_DIR}index.html%{ENV:CACHIFY_SUFFIX} [L]
@stklcode
Copy link
Contributor

I know this one’s ancient, but ...

2.) I miss some escapings in rewrite conditions

Why would we want to "escape" slashes and hyphens here?

There are no pattern delimiters used like /pat{2}ern/and the hyphens are outside character classes like [1-9], so no need to do anything about them.

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

Successfully merging a pull request may close this issue.

4 participants