2
如何使用.htaccess重写规则显示以下URL?参数?如何使用PHP中的.htaccess从URL中获取参数
Original URL
http://example.com/index.php?store=1
Desired URL
http://example.com/1/
OR
Desired URL
http://example.com/store/1
我尝试以下在.htaccess代码。我在这里错过了什么?
RewriteEngine On
Options +Followsymlinks
RewriteCond %{REQUEST_FILENAME} !-f
rewriteRule ^store/(.+)\$ index.php?store=$1 [L]
我的index.php文件有这个代码
<?php
$storeid = $_GET['store'];
echo $storeid;
?>
我是缺少在这里?