我正在使用 .htccess 文件来重写我的 URL。我在我的 .htaccess 文件中使用以下规则
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteRule ^product/([0-9]+)/([A-Za-z0-9+]+)$ /product.php?productid=$1&prodname=$2
重写工作正常。
但是,当我尝试通过相对路径访问任何其他页面时,在所有情况下,URL 都没有正确重定向。
就像下面的例子
<form action "something.php" method="post">
<input type="text" name="1" />
<input type="submit" value="submit" />
</form>
当我单击提交时,加载的页面http://mydomain/product/1/something/something.php
不存在,因此引发 404 错误
我尝试在头部使用基本标记,但这会在我使用页面锚点和模式窗口时产生问题。它被重定向到索引页面。
如果需要更多详细信息,请告诉我。
我对此很陌生。那么,有人可以帮我解决这个问题吗?
提前致谢, Kartik