Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    May 2004
    Location
    San Jose, CA
    Posts
    388
    Thanks
    0
    Thanked 0 Times in 0 Posts

    [SOLVED] Surely A Simply Rewrite

    I can't believe that I cannot figure this out.

    I have:
    http://nextvista.org/embed/player.phtml?id=1553

    and I want it to be:
    http://nextvista.org/embed/1553

    Among other things, I've tried to put this in my HTACCESS:

    Code:
    RewriteBase /embed
    
    RewriteRule ^([a-zA-Z0-9_-]+)$ /player.phtml?id=$1
    I've been through a few other possibilities and I just can't seem to figure it out. Maybe I need to drink more coffee today. In the meantime, does anyone have any suggestions? Thanks!
    Last edited by tsguitar2004; 07-06-2012 at 09:05 PM.
    -Challenge The Status Quo
    -www.toddseal.com/rodin

  • #2
    Regular Coder
    Join Date
    May 2004
    Location
    San Jose, CA
    Posts
    388
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I knew this would happen. I figured it out:
    Code:
    RewriteRule ^embed/([0-9]+)?$ embed/player.phtml?id=$1
    I simply had it in the wrong spot in my .htaccess file so other rules were getting in the way. So if you're like me and running something like this on a WordPress install, put these rules immediately after this block:
    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    Thanks for stopping by!
    -Challenge The Status Quo
    -www.toddseal.com/rodin


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •