You can use external rewriting for such things. This one will be a simple few-line perl script. See apache documentation for "External Rewriting Program".
You should be handling a path creation like that in PHP, before it even gets sent to the HTML and into an anchor for someone to click on. Not only does it contain spaces which will get converted into %20 and make the URL unreadable, it contains uppercase letters!
There is no efficient way to lowercase your letters and replace all the spaces with dashes efficiently. Most methods will use a bunch of extra HTTP requests.
发布评论
评论(2)
您可以使用外部重写来处理此类事情。这将是一个简单的几行 Perl 脚本。请参阅 apache 文档中的“外部重写程序”。
You can use external rewriting for such things. This one will be a simple few-line perl script. See apache documentation for "External Rewriting Program".
您应该像在 PHP 中那样处理路径创建,然后将其发送到 HTML 并发送到锚点以供某人单击。它不仅包含会被转换为
%20
并使 URL 不可读的空格,而且还包含大写字母!没有有效的方法可以有效地小写字母并用破折号替换所有空格。大多数方法都会使用一堆额外的 HTTP 请求。
You should be handling a path creation like that in PHP, before it even gets sent to the HTML and into an anchor for someone to click on. Not only does it contain spaces which will get converted into
%20
and make the URL unreadable, it contains uppercase letters!There is no efficient way to lowercase your letters and replace all the spaces with dashes efficiently. Most methods will use a bunch of extra HTTP requests.