Benji_
asked on
mod_rewrite
Hi Guys,
Wondering if you can help shed some light on my problem,
At the moment im makng a system where i have
http://url/index.php?page=cnt_name
sometimes i then need to pass variables to pages if i want to skip
http://url/index.php?page=cnt_name&funct=1&blah=2
i have attached my htaccess file,
is there a way that i can have it so
http://url/page
but then if i want to add variables it can be
http://url/page?variable=1&variable=2&blah=3
without having to create a rule within htaccess file for each page?
Best Regards
ben
Wondering if you can help shed some light on my problem,
At the moment im makng a system where i have
http://url/index.php?page=cnt_name
sometimes i then need to pass variables to pages if i want to skip
http://url/index.php?page=cnt_name&funct=1&blah=2
i have attached my htaccess file,
is there a way that i can have it so
http://url/page
but then if i want to add variables it can be
http://url/page?variable=1&variable=2&blah=3
without having to create a rule within htaccess file for each page?
Best Regards
ben
RewriteEngine on
###################################################
# Do not process images or CSS files further #
###################################################
# No more processing occurs if this rule is #
# successful #
###################################################
RewriteRule \.(css|jpe?g|gif|png)$ - [L]
RewriteRule ^([^/\.]+)/?$ /index.php?page=$1 [L]
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Guys
ASKER
i tried the above code, now i think i might just be besing stupid
the first bit how dows that understand what cnt_name is becuase cnt_name changes depending on what the page variable is, and how to you apend a variable to a string?
Best regards
ben