![]() |
|
|||||||
| 建站交流 讨论网站建设的基本方法、技巧、空间问题讨论、域名交流、 资源分享、技术交流,站长们经常进来看看噢! |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
IP: 222.184.115.77
|
|||
|
|||
|
i wanted to redirect because all domains point to one directory and now every domain pints to its directory
where the main domain is other and here it is RewriteEngine On RewriteCond %{HTTP_HOST} ^domain2.com$ [OR] RewriteCond %{HTTP_HOST} ^www.domain2.com$ RewriteRule ^/?$ http://www.domain2/shkupi [R=301,L] |
|
#2
IP: 222.184.115.77
|
||||||
|
||||||
|
How to do 301 redirects in Apache .htaccess, PHP,ASP
Apache Web Server .htaccess file Apache .htaccess files let you override the Web server configuration on a per-directory hierarchial basis, and are instrumental in the creation of proper 301 redirects. Single Page Redirect: Quote:
This solution will redirect any page requested via a non-www domain to the same URL with the www domain, and as such it can be placed in the DocumentRoot of your site and will be enforced globally: Quote:
Single Page Redirect: Quote:
Quote:
Single Page Redirect: Quote:
This code should be inserted into a global include file or any ASP script which is executed for every page on the site before the page output begins: Quote:
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Volume! What to do about domains? | sunshine | Google Adsense | 0 | 2006-12-11 09:41 AM |