Git Product home page Git Product logo

htaccess's People

Contributors

alelak avatar alexweissman avatar chouchen avatar decanus avatar djc avatar heiswayi avatar high5 avatar hjpotter92 avatar keenrivals avatar leonardo403 avatar lesstif avatar lfayer avatar lorepozo avatar ludovicm67 avatar marcobiedermann avatar moraxy avatar mountpoint avatar phanan avatar rbowen avatar rez0n avatar skilleddeveloper avatar styxofdynamite avatar thekondrashov avatar trueliarx avatar vincentorback avatar vlakoff avatar whiskeyjak avatar yousysadmin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

htaccess's Issues

Serve WebP Images works?

Can anyone confirm that the 'Serve WebP Images' snippet actually works? Tested it out in Chrome with some WebP images in same directory as JPEGS and with identical names (apart from file extension obviously) and Chrome never uses the WebP replacement for me.

TimeZone

php_value date.timezone 'Region/Zone'

Deny Access to Hidden Files and Directories should handle .well-known

https://github.com/phanan/htaccess#deny-access-to-hidden-files-and-directories

Instead of:

RedirectMatch 404 /\..*$

your example could be:

RedirectMatch 404 /\.(?!well-known\/)

Useful for:

A proposed standard which allows websites to define security policies.
https://securitytxt.org/

Private prefetch proxy in Chrome
https://developer.chrome.com/blog/private-prefetch-proxy/#traffic

Other uses:
https://www.iana.org/assignments/well-known-uris/well-known-uris.xhtml

Remove the includeSubDomains from Strict-Transport-Security

The optional includeSubDomains flag will enforce HTTPS on all subdomains. Any subdomain that will not have HTTPS will be blocked by the browser. Clearing the "cache" for HSTS is very complicated. As the max-age is set to one year, this can have a massive negative effect, if you, for whatever reason, need to have a subdomain on any server without HTTPS.

How to redirect multiple parameter of query string using htaccess

I have the following 2 links, Please some one help me

I want to redirect this page http://www.mywebsite.co.uk/category-of-mobile/any-words/?id=smob_qs&fromDate=&parts=

to another page http://www.mywebsite.co.uk/category-of-mobile/any-words/smob_qs

Note:

  • smob_qs key is the value of the first query string
  • For category-of-mobile keyword is fixed
  • For any-words keyword is dynamic [only characters letters a-z or A-Z]
  • For query string must removed second and third parameter
  • Must keep the first query string but only value. Example like "smob_qs"

So i need http://www.mywebsite.co.uk/category-of-mobile/any-words/smob_qs Url

Please help me using htaccess

Validate pull requests with Travis

Hello, I wrote a tool that can validate README links (valid URLs, not duplicate). It can be run when someone submits a pull request.

It is currently being used by

Examples

If you are interested, connect this repo to https://travis-ci.org/ and add a .travis.yml file to the project.

See https://github.com/dkhamsing/awesome_bot for options, more information
Feel free to leave a comment 😄

GZIP Compression for CSS Class names?

Is it possible to minify the class names inside CSS, HTML and JavaScript ? Like what we see in google.

like : .ga, .cb etc..

I'm not sure is that possible via .htaccess, but would be a great addition.

Apache 2.4

There were actually some breaking changes in the .htaccess syntax if you upgrade apache from 2.2 to 2.4. Check this page for a full list.

The most commonly problem is with the access control:
From:

Order deny,allow
Deny from all

To

Require all denied

Recommendation to remove www is questionable

I disagree with the line

It's actually recommended to remove www from your domain. Surprise surprise!

at https://github.com/phanan/htaccess#force-non-www

While one might choose to omit the www from a branding perspective, from a technical perspective it is generally preferable to redirect to the www version of the site.

Related Articles

Overall, this is a great resource. Thanks.

Force www except for subdomains

I found this rule here - https://stackoverflow.com/questions/20631015/force-www-in-htaccess-except-all-subdomains

RewriteEngine On
RewriteCond %{HTTP_HOST} ^[0-9a-zA-Z-]+\.[a-zA-Z]{2,}$
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

I get a double slash at the end of the url if i type in an address like server.lan/

So I changed it a bit to look like this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^[0-9a-zA-Z-]+\.[a-zA-Z]{2,}$
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

I don't know if it's good though. I made a quick test and it looks ok.

Apache 2.2 compatible access control

Where you have

Order Allow,Deny
Deny from whatever

This is a bit redundant , since the default is Deny in this case if no Allow rule is matched - source

Is this by design , just to be thorough ?

Order deny,allow

First off, awesome snippet collection! Very useful.

One thing I want to note however is having a space between deny,allow or allow,deny will throw back a server error. The space in between those (deny, allow) should be removed (deny,allow).

Thanks.

Translate to portuguese Brazil

Hi Phanan,

Can i make translate to portuguese Brazil ? Because very important for everyone, so going help many folks.

Resources Related

Allow All Access Except Spammers' not working as expected

The 'Allow All Access Except Spammers' snippet didn't work as I expected: the Deny settings were ignored; eveyone was allowed access.

Having read the documentation I think the explicit Allow from all line overrides the denials and should be removed.

Please be a good citizen of the Open Source community

@phanan Quite a lot of the things from this repository are basically taken from an older version of the .htaccess file provided by the Apache Server Configs project. So, I think it would be nice of you to make that obvious and give credit where credit is due (e.g.: there is no link to the Apache Server Configs project, and also some of the "Source" links don't even work, or point to a different project such as HTML5 Boilerplate, that is just another project that uses the Apache server configs).

Also, keep in mind that while you are free to copy and use the code, by not giving credit to the people that invested their free time to do the research to create the code, you make them less willing to do so in the future.

cult host liberation

Please consider adding some snippets for those not in the cult of www, but who would prefer to display domain uncluttered in URI.

Plainly I am not advocating contrawwwism.

[contratheism]

There is room for http://no-www.org and cultists alike. Evidently there is more space for the former as it consumes fewer bits.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.