本文介绍了使用非英语字符处理SEO友好URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的URL:.com/topic.php?id=6我可以将它们转换为:.com/topic/5.html这可行,但是现在我要转换.com/topic/title.html标题"是动态的,例如çağdaş,并且可以包含非-英文字符,例如ŞĞÜ

在这种情况下,我首先将字符转换为可接受的等效形式,例如ŞSÜU如果将çağdaş转换为cagdas,则我的URL看起来像这样.com/topic/cagdas.html /p>

我已经在SQL查询中使用cagdas来选择适当的行,但是在数据库中,它存储为çağdaş而不是cagdas.我可以做些什么来弥补这一点,以便数据库将动态URL以转换后的形式存储为cagdas?

?

解决方案

最简单的解决方案是将çağdaşcagdas都存储在数据库表中.

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?

解决方案

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

这篇关于使用非英语字符处理SEO友好URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-19 12:46