Force SSL/HTTPS with mod_rewrite [duplicate]

The following solution works for both proxied and unproxied servers. So if you are using CloudFlare, AWS Elastic Load Balancing, Heroku, OpenShift or any other Cloud/PaaS solution and you are experiencing redirect loops with normal HTTPS redirects, give it a try. RewriteEngine On # If we receive a forwarded http request from a proxy… RewriteCond … Read more

How do you enable mod_rewrite on any OS?

Nope, mod_rewrite is an Apache module and has nothing to do with PHP. To activate the module, the following line in httpd.conf needs to be active: LoadModule rewrite_module modules/mod_rewrite.so to see whether it is already active, try putting a .htaccess file into a web directory containing the line RewriteEngine on if this works without throwing … Read more

how to use “AND”, “OR” for RewriteCond on Apache?

This is an interesting question and since it isn’t explained very explicitly in the documentation I’ll answer this by going through the sourcecode of mod_rewrite; demonstrating a big benefit of open-source. In the top section you’ll quickly spot the defines used to name these flags: #define CONDFLAG_NONE 1<<0 #define CONDFLAG_NOCASE 1<<1 #define CONDFLAG_NOTMATCH 1<<2 #define … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)