jakebur01 Posted February 11, 2020 Share Posted February 11, 2020 I'm attempting to rewrite my urls but don't seem to be getting it to work. I've tried: RewriteEngine On RewriteRule /(.*)/(.*)/$ listings.php?ident=$1&facility=$2 And I've also tried: RewriteEngine On RewriteRule ^([^/\.]+)/([^/\.]+)?$ listings.php?ident=$1&facility=$2 Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/310012-trouble-with-htaccess/ Share on other sites More sharing options...
requinix Posted February 11, 2020 Share Posted February 11, 2020 I suggest that you try to describe your situation and your problem to us so we don't have to try to jump into the middle of it... Quote Link to comment https://forums.phpfreaks.com/topic/310012-trouble-with-htaccess/#findComment-1574189 Share on other sites More sharing options...
jakebur01 Posted February 11, 2020 Author Share Posted February 11, 2020 (edited) Ok. My input is https://www.test.com/listings.php?ident=TEST&facility=library. I'd like the output to be: https://www.test.com/TEST/LIBRARY. I'd like to make my urls seo friendly. Edited February 11, 2020 by jakebur01 Quote Link to comment https://forums.phpfreaks.com/topic/310012-trouble-with-htaccess/#findComment-1574190 Share on other sites More sharing options...
jakebur01 Posted February 11, 2020 Author Share Posted February 11, 2020 Nevermind. I figured it out. You make your links to your page as the friendly links and htaccess reads and converts the seo friendly link or directs it to the appropriate page. 1 Quote Link to comment https://forums.phpfreaks.com/topic/310012-trouble-with-htaccess/#findComment-1574191 Share on other sites More sharing options...
requinix Posted February 11, 2020 Share Posted February 11, 2020 That's right: .htaccess URL rewriting only tells Apache how to understand the new friendly URL structures. It doesn't also update the links on your pages for you. Quote Link to comment https://forums.phpfreaks.com/topic/310012-trouble-with-htaccess/#findComment-1574199 Share on other sites More sharing options...
gizmola Posted February 13, 2020 Share Posted February 13, 2020 On 2/10/2020 at 11:08 PM, jakebur01 said: Nevermind. I figured it out. You make your links to your page as the friendly links and htaccess reads and converts the seo friendly link or directs it to the appropriate page. Probably one of the most common misunderstanding for people starting out with the concept of "seo friendly" url's. You are definately not alone, but kuddos for figuring it out on your own. Quote Link to comment https://forums.phpfreaks.com/topic/310012-trouble-with-htaccess/#findComment-1574269 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.