.htaccess question

Discussion in 'Programming/Scripts' started by edge, Oct 1, 2008.

  1. edge

    edge Active Member Moderator

    I'm trying to get the following to work.

    When an URL is hit on my server (like www.domain.com/qwerty) I want it to call a file show.php?key=qwerty

    When I add the following htaccess code I sort of got it to work, but only when calling the server like this: www.domain.com/A/qwerty
    Code:
    RewriteEngine On
    RewriteRule ^A/(.+) show.php?key=$1
    Looking at the above htaccess code I thought that just removing the A/ would do the trick, but this is not so :(
    (when running it I only get the value key=show.php)

    So.. Any htaccess expert here how could show me how to make this work?
     
  2. edge

    edge Active Member Moderator

    Nevermind.

    I got it working.

    Code:
    RewriteRule ^/?([^/]*\?|[^\./]*)[:;,\.]*$ show.php?key=$1
     

Share This Page