[thelist] mod_rewrite question

Nickolay Kolev nmkolev at uni-bonn.de
Fri Nov 29 21:59:02 CST 2002


Hello all,

   I have a question on a mod_rewrite clause. Currently I am
   using this:

   RewriteBase /
   RewriteRule ^(article|interview)/(.*)$  $1.php?xyz=$2

   to do a transformation like:

   http://www.xxx.com/article/carrots to
   http://www.xxx.com/article.php?xyz=carrots

   http://www.xxx.com/interview/apples to
   http://www.xxx.com/interview.php?xyz=apples

   If, however, on the resulting page there are any relative
   links they all get leading to the false address.

   I can do an external redirect (using the [R] switch) to
   make the links work but this is reflected in the address
   bar as there the real (.php) address is revealed.

   Is there a way to get both things at the same time except
   for using abosolute links?

   Many thanks in advance!

--
Best regards,
 Nickolay                          mailto:nmkolev at uni-bonn.de




More information about the thelist mailing list