替换routeurl中的字符?
我正在尝试在网址中的路线中添加“全名”,我想知道应该替换哪些字符?我应该使用 _ 而不是空格吗?还有哪些其他字符可能“需要”替换?
大多数会使用瑞典名字,但有些可能有一些奇怪的字母,但不是冰岛的:)
/M
I'm trying to add a "fullname" in the route in my url, and I wonder which chars I should replace? Should I use _ instead of space? and what other chars might "need" replacing?
Mostly gonna use swedish names, but some might have some strange letters, not icelandic ones though :)
/M
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是 stackoverflow 如何在 URL 中包含标题。它会有所帮助。
Here is how stackoverflow includes titles in the URL. It could help.
出于 SEO 目的...
Google 已确认点 (.)、逗号 (,) 和连字符 (-) 是 URL 中的有效单词分隔符。
您最好从名称中完全删除任何特殊字符。有关完整说明,请参阅这篇文章...
http://www.internetofficer.com /seo/google-word-separator/
For SEO purposes...
Google has confirmed that the point (.), the comma (,) and the hyphen (-) are valid word separators in URL’s.
You're also better off removing any special characters from the names completely. For a complete description see this article...
http://www.internetofficer.com/seo/google-word-separator/