Apache Server configuration support - Question about order/priority RewriteRule and Redirect Statements

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > April 2007 > Question about order/priority RewriteRule and Redirect Statements





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Question about order/priority RewriteRule and Redirect Statements
dylan.yuen@googlemail.com

2007-04-27, 1:23 pm

I have the following .htaccess file in apache

..htaccess
RewriteEngine on
RewriteRule ^(.*).nsf(.*) http://localhost:81$1.nsf$2 [P]
Redirect 301 /index2.htm http://www.domain.com
Redirect 301 /open.nsf http://www.domain.com


if I go to http://www.domain1.com/ I see the apache default page.
if I go to http://www.domain1.com/index2.htm I get redirected to
http://www.domain.com as expected

using the http header request reader at http://www.rexswain.com/httpview.html
I can see that the redirections are marked as 301 redirections.

The redirection from /open.nsf to http://www.domain.com doesn't work,
it looks like the Rewriterule has higher priority and the page
http://www.domain1.com/open.nsf opens as if there is no redirection
setup

I tried using this statement
RedirectMatch 301 open.nsf http://www.domain.com

But the page still opens as normal, http://www.domain1.com/open.nsf
instead of
http://www.domain.com

How can I setup redirections for the pages that are "affected" by the
RewriteRule ?

I want http://www.domain1.com/open.nsf to go to http://www.domain.com
as a 301 Redirection.
Our Lotus Domino webserver only knows 200 redirections, not 301
redirections. I am using apache in front of Lotus domino

Apache HTTP on port 80
Domino HTTP on port 81

Please advise, any help is appreciated.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com