CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Apache configuration (http://www.codingforums.com/forumdisplay.php?f=69)
-   -   [SOLVED] Surely A Simply Rewrite (http://www.codingforums.com/showthread.php?t=267274)

tsguitar2004 07-06-2012 07:53 PM

[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!

tsguitar2004 07-06-2012 09:01 PM

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!


All times are GMT +1. The time now is 05:26 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.