Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用HTML自定义链接_Html - Fatal编程技术网

使用HTML自定义链接

使用HTML自定义链接,html,Html,我访问过一些网站,我注意到它们的链接与其他网站(或我的网站)不同 示例:“自定义”链接名称: 我的链接看起来像:或faq.htm(l) 问题是:如何使用HTML(5)获得这种链接 我不知道如何搜索此问题,因为我不知道它适合什么名称,我搜索了自定义链接,但这不是我需要的。您可以这样做: RewriteRule ^faq$ faq.php [L] 你问的不是很清楚。您是否在询问域(即.com.org等)、文件类型(html、php)或URL模式(domain.com、domain.com/faq)

我访问过一些网站,我注意到它们的链接与其他网站(或我的网站)不同

示例:“自定义”链接名称:

我的链接看起来像:或faq.htm(l)

问题是:如何使用HTML(5)获得这种链接


我不知道如何搜索此问题,因为我不知道它适合什么名称,我搜索了自定义链接,但这不是我需要的。

您可以这样做:

RewriteRule ^faq$ faq.php [L]

你问的不是很清楚。您是否在询问域(即.com.org等)、文件类型(html、php)或URL模式(domain.com、domain.com/faq)之间的区别?这些被称为语义URL(有时称为干净URL,或SEO友好URL)。如果您的PHP在Apache环境中运行,则需要将重写规则添加到.htaccess文件中。