I have a page which is www.example.com/page_name.php?var1=dynamic_var1&var2=dynamic_var2
I want to use .htaccess file to make it look like this www.example.com/page_name/dynamic_var1/dynamic_var2
I have tried this so far
RewriteRule ^page_name/(.*)/(.*)$ page_name.php?var1=$1&var2=$2 [NC]
and the problem is when this is going to database it goes like this
SELECT * FROM table_name WHERE id=dynamic_var1/dynamic_var2.php/dynamic_var1 LIMIT 1
and i also tried this
RewriteRule page_name/(\w+)/(\w+) page_name.php?var=$1&var2=$2
it is loading the page but without any pictures or css file or anything, and when i used firebug it said that it failed to load the URL given.
and when i tried this
RewriteRule ^page_name/(\w+)/(\w+)$ page_name.php?var=$1&var2=$2
It gave me internal server error
Thanks in advance,