How to drop subfolder in mod rewrite

Discussion in 'Apache' started by StoreMyPic, Jun 16, 2009.

  1. #1
    Hai

    I want you to help me


    i currently have urls in format

    http://mysite.com/gallery/google.html

    and i want to drop gallery and make url like below

    http://mysite.com/google.html

    currently i have this in my htaccess which is in gallery folder

    RewriteEngine on
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
    RewriteRule ^(.*)\.html$ index.php?search=$1
     
    StoreMyPic, Jun 16, 2009 IP
  2. StoreMyPic

    StoreMyPic Guest

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    any1 with ans?
     
    StoreMyPic, Jun 30, 2009 IP
  3. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #3
    umm in your main root put this .htacess

    RewriteEngine on
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
    RewriteRule ^(.*)\.html$ gallery/index.php?search=$1
     
    Bohra, Jun 30, 2009 IP