目前,当我的用户从我的商店购买时,它将转到:
http://localhost.com/shop/index.php?shopid=1&项目=2
我该如何到达的位置
1是购物ID,2是物品。
http://locahost.com/shop/1/2
在.htaccess文件中尝试以下操作
RewriteEngine On
RewriteRule ^shop/([^/.]+)/([^/.]+)?$ shop/index.php?shopid=$1&item=$2 [L,NC]
希望它能起作用。
此选项位于httpd.conf文件中。
将其从更改
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
至
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>