htaccess, sub folder rewrite to index.php

Discussion in 'Apache' started by rahim701, Jun 14, 2012.

  1. #1
    how can I do this?

    main link:

    http://www.domain.com/?link=whatever/something/everythting
    Code (markup):
    convert to:

    http://www.domain.com/whatever/something/everythting
    Code (markup):
    I tried with this:

    RewriteEngine On
    RewriteRule ^([^/]*)$ index.php?link=$1 [L]
    Code (markup):
    But not working.
     
    rahim701, Jun 14, 2012 IP
  2. RoseHosting

    RoseHosting Well-Known Member

    Messages:
    230
    Likes Received:
    11
    Best Answers:
    11
    Trophy Points:
    138
    #2
    You can try with

    RewriteEngine On
    RewriteRule ^([^/]*)$ /?link=$1 [L]
    Code (markup):
     
    RoseHosting, Jun 16, 2012 IP