Archive

Posts Tagged ‘.htaccess’

Redirect root domain to a subdomain .htaccess

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.mobile.phpcodez.com/ [R=301,L]

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: .htaccess Tags: ,

Redirect root domain to a subfolder .htaccess

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?phpcodez.com$
RewriteRule ^(/)?$ mobile [L]

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: .htaccess Tags: ,

Force SSL htaccess

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: .htaccess Tags: ,

Force https htaccess

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: .htaccess Tags: ,

Save Bandwidth – .htaccess

Paste the following code into your .htaccess file

<ifModule mod_php4.c>
php_value zlib.output_compression 16386
</ifModule>

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: .htaccess Tags: ,

Enable .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 ’
EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: .htaccess Tags: ,

Block 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]

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: .htaccess Tags: ,

Redirection 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]

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: .htaccess Tags: ,

Switch to our mobile site