Handling SEO Friendly URL with Non-English Characters

我的未来我决定 提交于 2019-12-13 17:30:22

问题


I have URLs like this: .com/topic.php?id=6 I can convert them to this: .com/topic/5.html This works, but now I want to convert .com/topic/title.html The "title" is dynamic, for example çağdaş and can contain non-English characters like Şor Ğ or Ü

In this case, I first convert characters to acceptable equivalents like Ş to S or Ü to U If I convert çağdaş to cagdas then my URL looks like this .com/topic/cagdas.html

I have used cagdas in SQL queries to select the proper row, but in the database, it is stored as çağdaş not cagdas. What can I do to remedy this, so that the database stores my dynamic URL in the converted form, as cagdas?


回答1:


The simplest solution is to store both çağdaş and cagdas in the database table.



来源:https://stackoverflow.com/questions/2940043/handling-seo-friendly-url-with-non-english-characters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!