doddsey_65 Posted February 26, 2011 Share Posted February 26, 2011 I am using seo friendly urls so when someone makes a post named "this is a post" the url will point to www.example.com/topic/this_is_a_post But when the user enters a character in their post name that means something in a url(? /) it obviously breaks. How can i make the urls safe from this without str_replace as i want to keep the characters. Quote Link to comment https://forums.phpfreaks.com/topic/228916-making-urls-safe/ Share on other sites More sharing options...
.josh Posted February 26, 2011 Share Posted February 26, 2011 you can urlencode it but why would you want those characters to show up in your url at all? Quote Link to comment https://forums.phpfreaks.com/topic/228916-making-urls-safe/#findComment-1180002 Share on other sites More sharing options...
doddsey_65 Posted February 26, 2011 Author Share Posted February 26, 2011 because the query that runs on the next page to get the content of the post checks the database for the post name that equals the get value in the url. Quote Link to comment https://forums.phpfreaks.com/topic/228916-making-urls-safe/#findComment-1180005 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.