.htaccess period in expression?

Discussion in 'Programming' started by Shoe ButtBack, Apr 6, 2010.

  1. #1
    Hey guys,

    This line is causing a lot of issues:

    RewriteRule ^([_A-Za-z0-9\.-]+)(/)?$ index.php?strURL=$1

    I basically want it so that when someone goes to domain.com/domain.com , it points to domain.com/index.php?strURL=domain.com and opens the page passing "domain.com" as a param of index.php

    Any clues?

    Thanks in advance,
    Armin
     
    Shoe ButtBack, Apr 6, 2010 IP
  2. nimonogi

    nimonogi Active Member

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    80
    #2
    Replace your rule with the following:
    
    RewriteRule ^([^/]*)$ ./index.php?strURL=$1 [L]
    
    Code (markup):
    Not tested but it should work.
     
    nimonogi, Apr 10, 2010 IP