Problem With Solutions

Something Different In Linux

Home » Archive by category 'htaccess'

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.bestdesigns.co.in/blog/$1 [R,L] =================================

redirect all URLs to anoter blog URLs

Posted by Rishikesh Vispute Categories: How to, htaccess

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.bestdesigns.co.in/blog. I have added the following rewrite rules into old blog .htaccess files menas when any one  [ Read More ]

https to http redirection

Posted by Rishikesh Vispute Categories: Basic Linux, How to, htaccess

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 ]

How to redirect domain to sub-directory without redirect to URL

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 ]

cgi_bin shows the internal server error

Posted by Rishikesh Vispute Categories: Error and solution, htaccess

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

Remove extensions from url

Posted by Rishikesh Vispute Categories: htaccess, Knowledge

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

Posted by Rishikesh Vispute Categories: htaccess, 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

Posted by Rishikesh Vispute Categories: Error and solution, htaccess

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

Posted by Rishikesh Vispute Categories: Error and solution, htaccess

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”;

Redirect one page to another page by using .htaccess

Posted by Rishikesh Vispute Categories: htaccess

Add the following rule in .htaccess file 1) If you want to redirect one page to another page, add the following code to the file, on a single line. redirect 301 /old-file-name.htm   http://www.domain.com/new-file-name.htm

Create your own Apache Rewrite Log file

Posted by Rishikesh Vispute Categories: cpanel, htaccess

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 ]

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

Posted by Rishikesh Vispute Categories: Error and solution, htaccess

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

Posted by Rishikesh Vispute Categories: htaccess, PHP

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

Posted by Rishikesh Vispute Categories: htaccess, Knowledge

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

Posted by Rishikesh Vispute Categories: How to, htaccess

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 ]

Optimized by SEO Ultimate