Mod_rewrite rule help

Discussion in 'Site & Server Administration' started by KroKite, Jun 30, 2011.

  1. #1
    Hi,

    I am on lighttpd engine and I have one doubt :-

    I am planning to transfer my forum from http://mydomain.com/forum to http://mydomain.com

    so I need to do something with mod_rewrite rule, as I am running in lighttpd engine, so i need to edit lighttpd.conf folder for it.

    Now my doubt is what would be the command to write :- what i think is this :-

    
    "^/forum/(.+)" => "http://www.mydomain.com/$1",
            "^/forum/([^&?]*)&([^?]*)$" => "http://www.mydomain.com/$1?$2",
    	"^/forum/([^&?]*)&([^?]*)\?(.*)$" => "http://www.mydomain.com/$1?$2&$3",
    
    Code (markup):
    Now Please suggest me solution... I have not tested it, nor i am not in option to test it, so if any of you have any idea or have some experience than do kindly reply back with your best solution.

    Thanks
     
    KroKite, Jun 30, 2011 IP
  2. KroKite

    KroKite Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    or this:-

    
    "^/forum/(.*)" => "http://www.mydomain.com/$1",
            "^/forum/$1?$2" => "http://www.mydomain.com/$1?$2",
    	"^/forum/$1?$2&$3" => "http://www.mydomain.com/$1?$2&$3",
    
    Code (markup):
    Please suggest me right way.

    Thanks
     
    KroKite, Jun 30, 2011 IP