wemustdesign Posted June 20, 2010 Share Posted June 20, 2010 Hi, I am trying to create a mod rewrite to make my URL go from: /?page=services§ion=plastering to /services/plastering/ This is what I had come up with but didn't work, am I on the right lines or will this rewrite not be possible? RewriteRule ^/services/([^/\.]+)/?$ index.php?services=$1§ion=$2 [L] Quote Link to comment https://forums.phpfreaks.com/topic/205305-mod_rewrite-question/ Share on other sites More sharing options...
cags Posted June 20, 2010 Share Posted June 20, 2010 Yes, that's about right, my guess is you need a forward slash before index.php. RewriteRule ^/services/([^/\.]+)/?$ /index.php?services=$1§ion=$2 [L] Also, please note that this means all links on your site should be of the form /services/plastering/, don't expect it to magically switch your URLs. Quote Link to comment https://forums.phpfreaks.com/topic/205305-mod_rewrite-question/#findComment-1074562 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.