Re: apache redirect rule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,
On Thu, Jul 23, 2009 at 10:46, David Hláčik<david@xxxxxxxxx> wrote:> RewriteCond %{HTTP_HOST} extensions.polarion.com> RewriteRule / http://extensions.polarion.com/polarion/extensions/
Usually those would be regexps, so the right syntax for what you wantwould be something like:
RewriteCond %{HTTP_HOST} =extensions.polarion.comRewriteRule ^/$ http://extensions.polarion.com/polarion/extensions/
The "=" in RewriteCond forces it to treat the second parameter as astring (if that does not work for you, try ^extensions\.polarion\.com$instead.)
In the second rule, you want to redirect only requests to /, so youneed to anchor it with ^/$.
And don't forget that you will also need:RewriteEngine on
Other than that, it should work fine. But I suggest you test theserules in a test environment first before commiting them to yourproduction machine.
HTH,Filipe_______________________________________________CentOS mailing listCentOS@xxxxxxxxxxxxxx://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux