Set Default Language – .htaccess
You can set the default language of the browser by adding the below given code in your .htaccess file DefaultLanguage en-US
View ArticleDetect iPhone – .htaccess
Paste the below given code into your .htaccess file RewriteEngine on RewriteCond %{HTTP_USER_AGENT} iPhone RewriteRule .* http://iphone.phpcodez.com/ [R]
View ArticleRedirection By Language – .htaccess
Paste the below given code into your .htaccess file RewriteEngine on RewriteCond %{HTTP:Accept-Language} (en) [NC] RewriteRule .* http://en.phpcodez.com [R,L]
View ArticleBlock Hitbots – .htaccess
Paste the below given code into your .htaccess file RewriteEngine on RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?phpcodezz.com.*$ [NC] RewriteRule .* phpcodez.com [L]
View ArticleEnable .htaccess in your server
Locate and open your httpd.conf in a text editor locate this section. locate the line that reads ‘ AllowOverride None ‘ Change it to ‘ AllowOverride All ’ Restart Apache ’
View ArticleSave Bandwidth – .htaccess
Paste the following code into your .htaccess file <ifModule mod_php4.c> php_value zlib.output_compression 16386 </ifModule>
View ArticleForce https htaccess
RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
View ArticleForce SSL htaccess
RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
View ArticleRedirect root domain to a subfolder .htaccess
RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?phpcodez.com$ RewriteRule ^(/)?$ mobile [L]
View ArticleRedirect root domain to a subdomain .htaccess
Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.mobile.phpcodez.com/ [R=301,L]
View Article