Reply to Re: redirect to directory - php redirect or htaccess?

Your name:

Reply:


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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация