rik72 Posted August 14, 2012 Share Posted August 14, 2012 Hi, I am currently writing a code to rename my pages so index.php?page=product becomes /product etc. For this i found a snippet online which seems to work great. RewriteEngine on RewriteRule ^([^/\.]+)/?$ index.php?page=$1 My problem is, i would also like to extend this so that http://url.com/product/t-shirts does not have to be http://url.com/product&product=t-shirts, i have a column in my database called product_seo which has a url friendly version of each products title which is how "t-shirts" is pulling the information on t-shirts etc. Any help would be greatly appreciated! Rik Quote Link to comment https://forums.phpfreaks.com/topic/267060-htaccess-rewrite-with-php/ Share on other sites More sharing options...
rik72 Posted August 14, 2012 Author Share Posted August 14, 2012 I have spent a further 20mins looking online and managed to solve my issue. This website had a good article on how to solve it! http://www.workingwith.me.uk/blog/software/open_source/apache/mod_rewriting_an_entire_site Quote Link to comment https://forums.phpfreaks.com/topic/267060-htaccess-rewrite-with-php/#findComment-1369269 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.