Ok I've read and search some here but haven't found an answer for my question or maybe im too new to url rewrite and just can't figure it out. Here's what I am trying to accomplish:
I have a table that holds channels description and ID, the ID is used to know what content to show, so I have something like this in my URL
http://www.mysite.com/page?channel=1
now what I would like to do is to display this:
http://www.mysite.com/page/description
and still be able to somehow get the id of that description to display the appropriate content. hopefully this makes sense. The only thing that i've thought of is at the top of my page, do a:
select * from channels where description = $_GET['description']
and have that return the id, and then use it. Would that be the only way to go? or is .htaccess good enough? such a noob :(
EDIT: this is in my htaccess right now:
AddType x-mapp-php5 .php
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
## hide .php extension
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L,NC]
## To internally redirect /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]
##This is to redirect just stream page only
RewriteRule ^stream/(.+)/([0-9]+)$ /stream.php?channel=$1