httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Gaber <Brian.Ga...@ssc-spc.gc.ca>
Subject [users@httpd] URL Rewrite Question
Date Fri, 28 Mar 2014 14:39:37 GMT
This is my first attempt at using RewriteRule.

I have about 200 webpages the contain SPS or MENU (in UPPER or lower case) that I want to
send to a webpage on another server.

I thought this might work, but it has not.

RewriteCond  %{REQUEST_URI}  (SPS|MENU)
RewriteRule  ^/$                 http://new-webserver/new-webpage.html  [L]

I based this on what I read in http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule
and this example found therein:

RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla
RewriteRule  ^/$                 /homepage.max.html  [L]

                I am fairly familiar with Perl Regular Expression, but could someone explain
what ^/$ does?  I understand what ^ and $ do.

                Thanks.

Brian


Mime
View raw message