July 1, 2015

A WP Ghost adds code to .htaccess file!

I was working with .htaccess and whenever i change some apache headers in .htaccess so in a few moments some script was adding the following snippet again on EOF. It was a surprise for me that what type of ghost is there inside WordPress which has to check the “# END WordPress” and appends after […]

September 13, 2014

WordPress based website tagged as hacked or infected?

WordPress based website tagged as hacked or infected? Is this your problem too? Your theme is behaving odd when you inject a parameter to your URLs like ?p=something. Every time your site is giving response on anonymous query string too, although it should deny them. By this, spamming requests are being entertained, and Google is […]

May 14, 2014

CORS – Cross-Origin Resource Sharing

CORS – Cross-Origin Resource Sharing How to enable CORS in your website? How to send cross site request through ajax? How to enable cross site jquery post? How to enable cross site jquery get? How to enable cross site jquery request? How to handle cross site requests? Try this in your .htaccess Header set Access-Control-Allow-Origin […]

September 29, 2013

mod_rewrite check with php

.htaccess file

echo ‘mod_rewrite ‘.((strpos(shell_exec(‘/usr/local/apache/bin/apachectl -l’), ‘mod_rewrite’) !== false)?”:’ does not ‘).’ exist’;

February 25, 2012

Big files are not uploading in IE?

Big files are not uploading in IE? If you are facing the following problems: Images/Files are uploading but not being written on disk, when you check through ftp so files are not found on expected location Files are uploading when you check your module on Firefox but doesn’t work when check in IE8 or even […]

February 1, 2012

Codeigniter .htaccess issue on PHP-CGI, WebHero Hosting

Codeigniter .htaccess issue on PHP-CGI, WebHero Hosting .htaccess part will be: RewriteEngine On RewriteBase / RewriteCond %{ENV:REDIRECT_APP_PATH} !^$ RewriteRule ^(.*)$ – [E=APP_PATH:%{ENV:REDIRECT_APP_PATH}] RewriteCond %{ENV:APP_PATH} ^$ RewriteRule ^(.*)$ – [E=APP_PATH:/$1] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [L] Codgienter Part (config.php): $config[‘uri_protocol’]    = “APP_PATH”;//’REQUEST_URI’;  

January 6, 2012

error reporting ON in .htaccess

php_flag display_errors 1 php_value error_reporting 8191

December 12, 2011

Caching with .htaccess

Caching with .htaccess # Set the cache-control max-age # For 1 year <FilesMatch “\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$”> Header set Cache-Control “max-age=31449600, public” </FilesMatch> # For 2 DAYS <FilesMatch “\.(xml|txt)$”> Header set Cache-Control “max-age=172800, public, must-revalidate” </FilesMatch> # For 4 HOURS <FilesMatch “\.(html|htm|php)$”> Header set Cache-Control “max-age=14400, must-revalidate” </FilesMatch> Followings things should be considered as well: https://developers.google.com/speed/docs/insights/EnableCompression