| 
 Posted by lorento on 06/26/06 11:32 
This htaccess will redirect to particular directory from spesific host 
 
RewriteCond %{REMOTE_HOST} ^spesifichost.com$ 
RewriteRule ^(.*)$ http://www.yourhost.com/directory/ 
 
hope it works 
-- 
http://blog.deshot.com 
http://www.groupvita.com 
 
deko wrote: 
> I'm trying to redirect requests for /index.php to /mydirectory/index.php 
> 
> If I use an index file in / with only this line: 
> 
> <?php header("Location:http://www.mysite.com/mydirectory/"); ?> 
> 
> that seems to work. 
> 
> But can this be accomplished more efficiently with an htaccess rewrite? 
> 
> I already have this rewrite rule in my htaccess file: 
> RewriteEngine on 
> Options All -Indexes 
> RewriteCond %{HTTP_HOST} ^www.myoldsite.com$ [NC,OR] 
> RewriteCond %{HTTP_HOST} ^myoldsite.com$ [NC] 
> RewriteRule ^(.*)$ http: //10.10.10.10/This just sends requests for 
> myoldsite.com into hyperspace, but allows me to get email using that domain.How 
> do I append to htaccess so that I can redirect requests for a specific host to a 
> particular directory?Thanks in advance.
 
  
Navigation:
[Reply to this message] 
 |