Jump to content

Building links using php and htaccess?


gibbonuk

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/252106-building-links-using-php-and-htaccess/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.