Showing posts with label PHP tutorials. Show all posts
Showing posts with label PHP tutorials. Show all posts

Tuesday, 6 August 2013

Redirect URL's index page to nonindex page

Try to use this important htaccess code for redirecting an URL's index page to non index Url’s. this code is very very important for seo point of view

 RewriteCond %{THE_REQUEST} /index\.html [NC]
RewriteRule ^/?index\.html$ http://www.maindomain.com/$1 [R=301,L]

Redirect URL from subdirectory to sub domain using htaccess

We can redirect URL's from any subdirectory (like maindomain.com/dorectoryname) to a sub domain (subdomain.maindomain.com) using PHP and .htaccess by the subsequent ways.
For example, the .htaccess file is full of rules like the following:
------------------------------------------------------------------------------------------------------------------------
RewriteCond %{HTTP_HOST} ^(www\.)?maindomain\.com$
RewriteRule ^dorectoryname/(.*)$ http://subdomain.maindomain.com/$1 [L,QSA,R=301]

or we can using this code
 
RewriteCond %{REQUEST_URI} ^/dorectoryname
RewriteRule ^(.*)$ http://subdomain.maindomain.com/$1 [R=301,L,P]

Tuesday, 23 August 2011

PHPtutorials4all Basics

PHPtutorials4all provides information for making dynamic and interactive Web pages.
Related Posts Plugin for WordPress, Blogger...