On Feb 12, 2008 3:32 PM, Charles Li <[EMAIL PROTECTED]> wrote:
> I would like to redirect base on the context:
>
> When user access my server with the following:
>
> http://server/outside
>
> I would like to redirect them to another site.
> I try the following, but did not get it work.
>
>     RewriteEngine on
>     RewriteCond %{REQUEST_URI} ^/outside$   [NC]
>     RewriteRule ^/$ http://server/basic.jsp [R]
>
> It just gives me a page not found 404.
> Please can yo point out what am I doing wrong?

The regex in the RewriteRule matches ONLY /, thereby contradicting the
RewriteCond. It sounds like you just want
RewriteRule ^/outside$ http://server/basic.jsp [R]

Use the RewriteLog to see what mod_rewrite is doing.

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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to