1

我正在寻找清理我的 URL 并且我遇到了最困难的时间。我在 GoDaddy 上有一个 Apache 服务器。不确定托管是否是问题所在。我上传了很多.htaccess文件,但没有一个有效。

目标:我试图从我的网站中完全消除“.php”。

示例:http://example.com/about.phphttp://example.com/folder/anotherpage.php

我希望它阅读http://example.com/abouthttp://example.com/folder/anotherpage

.htaccess我该如何为此编写文件?我发现的所有答案都更多地涉及参数。

我所做的一切似乎都不起作用。这是 GoDaddy 的问题吗?请帮忙。提前致谢。

4

1 回答 1

0

我认为应该是这样的:

RewriteEngine On
RewriteRule about about.php
RewriteRule folder/anotherpage folder/anotherpage.php
于 2013-06-27T03:59:03.913 回答