Rewrite virtual subdomain and virtual folder

Discussion in 'Apache' started by Gonzo4u, Mar 25, 2009.

  1. #1
    Hello Guys,

    I am learning Apache mod rewrite and not very verse in it. I would like you all pro in Apache help me out in giving optimum solution.

    Mod Rewrite:
    I want to handle virtual subdomain and virtual folder redirect internally without changing URL in the browser address bar. All virtual subdomains are handle using wildcard DNS entry and are redirected by Cpanel to /catchfolder/.

    Question:

    eg: http://wildcard.domain.com/virtualfolder

    redirect to

    http://www.domain.com/catchfolder/index.php?sd=wildcard&f=virtualfolder

    but URL should remain the same in browser i.e http://wildcard.domain.com/virtualfolder

    I had a workable solution but the problem is, its changing the URL address in browser to redirect URL address, which I dont want.

    Any help will be appreciated.

    Thanks and Regards,
    Gonzo
     
    Gonzo4u, Mar 25, 2009 IP