Url Remapping Issue With .htaccess

Discussion in 'Apache' started by ep0ch, Jan 25, 2013.

  1. #1
    Christ I just cant get this even with endless googling...

    I have a directory of /flash/1.swf all the way to /flash/4000.swf on my hosting.

    I am trying with terrible luck to load the flash movies into the container on zomgflash dot com(avoiding possible spam) -- its all setup...it should be loading the movies...I think it's a mod_rewrite problem but I could be wrong...it's basically a clone of iwantmoar dot com(avoiding spam again) -- you'll notice when you type a number after the domain like /238 or /2898 that it loads up /flash/238.swf or /flash/2898.swf into the flash container on the iwantmoar website. That's what I'm trying to get my website to do.

    I need them shown like http://zomgflash.com/1 in the address bar... and that would have index.php load up 1.swf in the container if that makes more sense.

    I really hope someone can help me with this!

    This is the contents of my .htaccess from my relentless googling:

    <IfModule mod_rewrite.c>
    Rewrite-engine on
    RewriteRule ^([0-9]+)$ /index.php [PT]
    </IfModule>
    ErrorDocument 404 /index.php

    I'm sure that's utter failure...I just hope someone can help with this...

    Thanks in advance,
    Jason
     
    ep0ch, Jan 25, 2013 IP
  2. ryan_uk

    ryan_uk Illustrious Member

    Messages:
    3,983
    Likes Received:
    1,022
    Best Answers:
    33
    Trophy Points:
    465
    #2
    It's difficult to say without knowing the script. I assume the redirect passes a parameter to script (such as a PHP one), so something like:

    RewriteRule ^([0-9]+)$ /index.php?flashgame=$1 [L]
    Code (markup):
    Perhaps.
     
    ryan_uk, Jan 28, 2013 IP