How much does using htaccess files slow down website performance (especially with solid state disks)?

From an answer on Quora by Jonathan Klein, 12ms for a 1500 line .htaccess file: Having a large .htaccess does have a cost. Ours is currently ~1500 lines and we benchmarked the time spent parsing it at around 10-12ms on a production webserver. Hardware makes a difference obviously, but you can fairly safely assume that … Read more

500 Internal Server Error when using .htaccess with RewriteEngine

\xef\xbb\xbf are three invisible junk characters (at least from Apache’s perspective) called the Unicode BOM, or byte order mark. Apache thinks that those characters are part of the command that follows right after. This is what you see in the log, though the characters are escaped so they’re visible to the naked eye. \xef\xbb\xbfRewriteEngine In … Read more

Redirect to HTTP non-www to HTTPS www htaccess

Try it like this: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301] The only real difference here is that first we redirect from non-WWW to WWW then we check for HTTPS and redirect it. If it does not work, try this one: RewriteEngine On RewriteCond %{HTTP_HOST} … Read more

Redirect to other domain but keep typed domain

It is possible to get it done via mod_rewrite but make sure mod_proxy is enabled in your Apache’s httpd.conf. Once that is done enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory: Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(www\.)?mydomain\.be$ [NC] RewriteRule ^ http://www.mydomain.nl%{REQUEST_URI} [L,NE,P] … Read more

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