【问题标题】:Looking for answer about Clean URLs that I have not found thus far寻找迄今为止我还没有找到的关于 Clean URLs 的答案
【发布时间】:2013-06-27 03:54:37
【问题描述】:

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

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

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

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

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

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

【问题讨论】:

    标签: .htaccess mod-rewrite clean-urls


    【解决方案1】:

    我觉得应该是这样的:

    RewriteEngine On
    RewriteRule about about.php
    RewriteRule folder/anotherpage folder/anotherpage.php
    

    【讨论】:

    • 感谢您的快速回复,但这对我不起作用。这玩意要了我的命!
    猜你喜欢
    • 1970-01-01
    • 2022-01-17
    • 2017-08-14
    • 1970-01-01
    • 1970-01-01
    • 2014-11-16
    • 1970-01-01
    • 1970-01-01
    • 2011-08-26
    相关资源
    最近更新 更多