[英]URL rewrite with .htaccess is not working at xampp
My current url is 我目前的网址是
I want to display my url as 我想显示我的网址为
I use the following code but it not woking 我使用以下代码,但无法正常工作
RewriteEngine On
RewriteRule ^post/(.*) /post.php?postid=$1
I think it's because the rewrite engine is look for: 我认为这是因为重写引擎正在寻找:
Instead of looking for: 而不是寻找:
Try adding: 尝试添加:
RewriteBase /b2b/
before the RewriteRule. 在RewriteRule之前。
Remove the /
before post.php?
在
post.php?
之前删除/
post.php?
. 。 So your code should be:
因此,您的代码应为:
RewriteEngine On
RewriteRule ^post/(.*) post.php?postid=$1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.