gibbonuk Posted November 30, 2011 Share Posted November 30, 2011 Hi, im a little confused on which way im meant to be doing this. I have a URL that my php builds with parameters depending on user selections. So we may end up with: www.mysite.co.uk/mypage.php?p1=10&p2=20&p3=40 And i have a simple mod rewrite to show that more SEO friendly. So a user could goto www.mysite.co.uk/mypage-p1-10-p2-20-p3-40.html and it would work, BUT when the user goes to the above .html address it works but shows in the address bar as: www.mysite.co.uk/mypage.php?p1=10&p2=20&p3=40 I also thought it would be good to build my links withing PHP as the SEO friendly ones but again, when the link is clicked the user sees the old one? So.. which way am i meant to be doing this? What i would like is to completly hide the actualy URL and have it so if the user goes via the SEO friendly one it works and SHOWS the SEO freindly one, this way i can use them links in my pages aswell. Thanks Andy Quote Link to comment https://forums.phpfreaks.com/topic/252106-building-links-using-php-and-htaccess/ Share on other sites More sharing options...
trq Posted November 30, 2011 Share Posted November 30, 2011 You need to make your code produce the more SEO friendly one, then mod-rewrite maps it through to the original. If you making the SEO type links and they are being redirected to the older style, there is something wrong with your rewrite rule. Quote Link to comment https://forums.phpfreaks.com/topic/252106-building-links-using-php-and-htaccess/#findComment-1292541 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.