CAll Us: USA +1 9176775553   Login

php parse with shtml

How to parse the php code in .shtml file. Ans : If you want to use php code in .shtml file then you need to add the following handler in .htaccess file. AddType application/x-httpd-php5  .php5 .php4 .php .php3 .php2 .phtml .shtml AddHandler application/x-httpd-php5  .php5 .php4 .php3 .php2 .phtml .shtml Done

Read More »

https to http redirection

How to redirect domain from https://domain.com to http://domain.com ? Ans: If you tried all the possibilities with the .htaccess file and your domain is still not redirected from https to http then finally you can add following code in virtual host entry means in httpd.conf file. Search the 443 entry for a domain and add […]

Read More »

redirect all URLs to anoter blog URLs

If you want to redirect all the URLs  from one blog to another blog URLs then add the following rewrite rules in .htaccess files. Example : I have redirected  my old blog from “http://www.bestdesigns.co.in/blog to my new domain http://www.indianwebportal.com. I have added the following rewrite rules into old blog .htaccess files menas when any one […]

Read More »

How to redirect from http to https

If you want to redirect all the URLs from http to https then add the following rules in .htaccess files OR Redirect from http://domain.com/anything to https://domain.com/anything For Example : Redirect  from http://indianwebportal.com/anything to https://www.indianwebportal.com/anything ================================= RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} / RewriteRule ^(.*)$ https://www.isquarehost.com/$1 [R,L] =================================Read More »

Problem in password protection using .htaccess

How to protect CRE Loaded admin area ? or Problem when page requires authentication or How to set  password protection for sub directory  without affecting to other .htaccess rewrite rules Ans : You will notice that the default .htaccess will not work if your page requires authentication. Suppose you have set the password protection for […]

Read More »

How to enable SSI ?

How to enable Server Side Includes on the server ? Ans: First you can check SSI are enabled on your server or not.  So create one test.html file and add the following code . <!–#ECHO var=”DATE_LOCAL” –> Then access the page by using the URL http://domain.com/test.html  and  it shows the current date to the screen […]

Read More »

cgi_bin shows the internal server error

Error:   500 internal server error is shown when access URL http://domain.com/cgi-bin/index.php Solution : Add the following Handler in httpd.conf file or .htaccess file. AddHandler application/x-httpd-php .php Done

Read More »

Remove extensions from url

How to remove the  .php extension from the URL  ? Ans : Add the following code in .htaccess file ====================== Options +FollowSymLinks Options +Indexes RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^([^\.]+)$ $1.php [NC,L] ====================== How to remove the  .html extension from the URL  ? Ans : Add the following code in .htaccess file ====================== Options […]

Read More »

.htaccess Generation Issues in wordpress

Fixing .htaccess Generation Issues in wordpress If your installation of WordPress does not generate a .htaccess file or if it does not write the new rules onto your existing .htaccess file then there are a couple reasons that could be causing this. Work step by step and continue to the next step only if the […]

Read More »

Redirect domain to .cgi file

If you want to redirect your domain http://domain.co.uk to http://domain.co.uk/cgi-bin/test/subdirectory/test.cgi file then add the following rewrite rule in .htaccess file ==================== Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.domain\.co\.uk$ [NC] RewriteRule ^/?$ “http\:\/\/www\.domain\.co\.uk\/cgi-bin\/test\/subdirectory\/test\.cgi$1” [R=301,L] ==================== Or ==================== http://domain.com to http://domain.com/cgi-bin/subdirectory/test.cgi then add the following rewrite rule in .htaccess file ==================== RewriteEngine on RewriteCond %{HTTP_HOST} ^domain.com$ [OR] […]

Read More »

CodeIgniter redirection problem

If CodeIgniter is installed on the linux server and the .htaccess file is correct but your domain is not working properly then you need to set the  “uri_protocol” in the “system/application/config/config.php” file is as follows. $config[‘uri_protocol’]    = “REQUEST_URI”;

Read More »

Create your own Apache Rewrite Log file

How to Create your own Apache Rewrite Log file ? If your account is hosted on suexec server then you need to add this code in http.conf file otherwise you can enable it by using .htaccess file. By using  http.conf file You need to ============================= # Roll your own Rewrite log # Log details via […]

Read More »

How to make root domain .htaccess not affect to addon domain

Some time the root domain .htaccess file rule affect to addon domains. So you can not access your addon domain properly. If you want to disable this rule for the addon domain then you need to add the following rule in the root domain .htaccess file. RewriteCond %{HTTP_HOST} ^(www\.)?addon_domain\.com Rewriterule .* – [L] for example […]

Read More »

Client denied by server configuration

Client denied by server configuration : Error : tail -f /usr/local/apache/logs/error_log | grep username [Sun Dec 07 14:04:38 2008] [error] [client 203.193.165.98] client denied by server configuration: /home/username/public_html/catalog/admin/index.php Solution: If you get above error then you need to check .htaccess file under respective directory(here catalog/admin) and there you need to comment the rule “Deny from […]

Read More »

How to enable php setting for all Directories

If you want enable some php related setting by using php.ini file and it reflect to all  other directories which is under your account. Then follow the steps.. First create php.ini file under the document root of your domain and change or add the default setting which you want or which is required for your […]

Read More »

What is Mod-Rewrite Module

What is Mod-Rewrite Module? Mod_rewrite is merely the Apache module that contains the rewrite engine – other servers will process URL rewriting differently.Mod-Rewrite module uses a rule-based rewriting engine (based on a regular-expression parser) to rewrite requested URLs on the fly. It supports an unlimited number of rules and an unlimited number of attached rule […]

Read More »

Redirection from http to https

How to Redirect from http to https URL. If the ssl is installed on the server and you want to all the request redirected to https then you need to add the folloing code in .htaccess file. ============================ RewriteEngine on Options +FollowSymLinks RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R] ============================ or ============================ RewriteEngine on Options […]

Read More »