1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Mod rewrite help thanks

Discussion in 'PHP' started by ads2help, Dec 5, 2008.

  1. #1
    How to construct the mod_rewrite file if I want
    SEMrush
    http://mysite.com/mydir/4357hhdbgd5td7fd77fdghdsfdg0

    to

    http://mysite.com/myfunction.php?what=4357hhdbgd5td7fd77fdghdsfdg0


    The red part is a random string that consists of lower case alphabets and numbers only.

    Thanks!!
     
    ads2help, Dec 5, 2008 IP
    SEMrush
  2. juust

    juust Peon

    Messages:
    214
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RewriteEngine On
    RewriteRule ^mydir/(.*) /myfunction.php?what=$1

    that's what I use ?
     
    juust, Dec 5, 2008 IP
  3. xrvel

    xrvel Well-Known Member

    Messages:
    918
    Likes Received:
    30
    Best Answers:
    2
    Trophy Points:
    175
    #3
    A little bit modification based from juust's previous post.

    
    RewriteEngine on
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    RewriteRule ^mydir/(.*)$ myfunction.php?what=$1 [NC,L]
    
    Code (markup):
     
    xrvel, Dec 6, 2008 IP