mod_rewrite and wildcard DNS

Discussion in 'Apache' started by Echilon, May 28, 2007.

  1. #1
    I'm having problems with rewriterule. Ity's always a buit hit and miss, but I can't figure out why it's not working this time. I wan to change from having a load of arguments in the URL to having a directory/subdirectory structure. I have wildcard DNS enabled, and the code below rewrites every subdomain to an argument - eg: http://blah.mydomain.net/ becomes http://mydomain.net/index.php?cal=blah.
    The problem is, I want to pass more paramaters, so http://blah.mydomain.net/rss/ becomes http://mydomain.net/index.php?cal=blah&act=rss. I've tried using another rewrite rule, but I can't get it working. I *think* it should be something like this:
    Could anyone lend a hand?
     
    Echilon, May 28, 2007 IP