This is a discussion on Re: Redirecting to Tomcat within the Apache Web Server forums, part of the Web Server and Related Forums category; Per Johansson wrote: > Can I make redirection work on the top > level URI and selected URI:s only? ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Per Johansson wrote:
> Can I make redirection work on the top > level URI and selected URI:s only? Use RedirectMatch instead: RedirectMatch 301 ^/$ http://www.dot.com:8080/JSPApplication/ -- Robert |
|
|||
|
I'm using the following to direct every page ending in .html through a php
function: RewriteRule ^(.*)\.html$ /dopage.php?p=$1.html [L] I have a UNIX admin page that I *don't* want to get treated by this. How would I modify this to exclude that one page? I assume by using RewriteCond, but I'm not sure of the syntax. The URL to exclude would be www.example.com/admin/index.html Thanks, -- Stephen Kay Karma-Lab sk@karma-lab.NOSPAM.com ^^^^^^^ |
|
|||
|
Stephen Kay wrote:
> I assume by using RewriteCond Exactly. One which checks the value of REQUEST_URI: # note: the following is not a RegEx RewriteCond %{REQUEST_URI} !=/admin/index.html RewriteRule ^(.*)\.html$ /dopage.php?p=$1.html [L] -- Robert |
|
|||
|
in article e3oepu$nct$1@online.de, Robert Ionescu at
robsiegen@googlemail.com wrote on 5/8/06 5:56 PM: > Stephen Kay wrote: >> I assume by using RewriteCond > > Exactly. One which checks the value of REQUEST_URI: > > # note: the following is not a RegEx > RewriteCond %{REQUEST_URI} !=/admin/index.html > RewriteRule ^(.*)\.html$ /dopage.php?p=$1.html [L] Thanks! But it appears it was not as simple as I originally anticipated. :( How would you do the above, but exclude *any* page in the /admin folder? Thanks much, -- Stephen Kay Karma-Lab sk@karma-lab.NOSPAM.com ^^^^^^^ |