| Change default directory page using .htaccess | | 2008-04-21 10:27:16 | | I know you guzy all know about index file. This is the default file which is executed in the web server. For example, if you type”http://roshanbh.com.np” in this the browser, the “index.php” gets loaded first. This “index.php” file is commonly know as directory index file.
Basically , the default executed file in the web directory starts [...]... | | By: PHP And Ajax Related Useful Resources and Codes | | |
|
|
|
|
|
|
|
| 301 redirect in PHP and .htaccess | | 2007-12-29 11:12:00 | | What is 301 redirect ?
You have a website and its all pages are ranked in the search engine. And now you’ve moved these files to a new domain. What will happen in this scenario!!. You are sending the visitor to “Error 404 - File not found” page when they follow your website in the search [...]
... | | By: PHP And Ajax Related Useful Resources and Codes | | |
|
|
|
| How to use .htaccess for Redirection | | 2007-07-21 11:26:20 | | Recently, when I had a domain change, I needed something in order to transfer all of my traffic from the old domain to the new one. So I used .htaccess for the redirection.
You can also use this, by typing the following in your .htaccess:
RewriteEngine OnRewriteCond %{HTTP_HOST} ^.*oldwebsite.com$ [NC]
RewriteRule ^(.*)$ http://www.preferredwebsite.net/$1 [R=301,L]
Replace oldwebsite.com with the current website and replace http://www.preferredwebsite.net with the new website URL where you want to redirect the traffic to.
If you want to know what did I used for my old domain, then see below:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sizzledcore.uni.cc$ [OR]
RewriteCond %{HTTP_HOST} ^www.sizzledcore.uni.cc$
RewriteRule ^(.*)$ http://www.sizzledcore.com [R=301,L]
... | | By: Sizzled Core - A collection of sizzling findings! | | |
|