bigheadedd Posted January 3, 2011 Share Posted January 3, 2011 Hi there, I'm having a little trouble working with a few different variables in my htaccess rewriterules. What I have basically is a file called font.php, and inside it I have two different functions. The first rule makes it so it says /fonts/font1/regular all good. However, within each font, there are options to see 'about' it. So instead of $weight; its $about... I know the problem is that of they have the same pattern, is there any way of solving this? Or would it be best to change the php code so that I just work with one variable (weight), and then determine the data etc inside of the php file? RewriteRule ^fonts/([a-zA-Z0-9^-]+)/([a-zA-Z0-9^-]+)$ /font.php?font=$1&weight=$2 [R=302] RewriteRule ^fonts/([a-zA-Z0-9^-]+)/([a-zA-Z0-9^-]+)$ /font.php?font=$1&about=$2 [R=302] Sorry if I'm not making too much sense! Thanks in advance Edd Quote Link to comment https://forums.phpfreaks.com/topic/223273-multiple-variables-in-htaccess/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.