Re: mod_rewrite base url

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

 



That fixed it, thanks Joshua!  Here is my final config.

RewriteEngine On

#Match all request URIs that are empty
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) http://%{HTTP_HOST}/insight/


On Jan 5, 2008 11:04 PM, Joshua Slive <joshua@xxxxxxxx> wrote:
On Jan 5, 2008 9:13 PM, Todd Nine <todd.nine@xxxxxxxxx> wrote:
> Hi all,
>   I'm running Apache with mod_jk, and several tomcat back end servers.  I
> have a default application I would like to use, but I'm not sure how to get
> mod_rewrite to work to redirect the client to the default server.  What I
> would like is something like the following
>
> user enters --> http://www.myserver.com/
> mod_rewrite redirects to --> http://www.myserver.com/insight
>
> I have the following, but its not working.  I'm basically trying to find an
> empty URI then redirect, but it doesn't seem to work.  I just get the empty
> directory indexing.  Could anyone give me a hand?
>
> RewriteEngine On
>
> #Match all request URIs that are empty
> RewriteCond %{REQUEST_URI} ^$
> RewriteRule (.*) http://%{HTTP_HOST}/insight/

REQUEST_URI is never empty. It always contains at least "/". What you
want is perhaps
RewriteRule ^/$ /insight/ [R]
(assuming you are doing this in the main server config in httpd.conf)

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux