0
我有以下WAMP
vhost
:重写规则为特定的项目文件夹(WAMP)
<VirtualHost *:80>
ServerName testProject
DocumentRoot c:/wamp64/www/testproject/public
<Directory "c:/wamp64/www/testproject/public/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require local
</Directory>
当我访问该链接testproject
链接我的土地上testproject/home/
。该testproject
文件夹的结构如下:
里面的.htaccess
从profile-update
文件夹我想应用RewriteRule
。下面是里面的代码:
RewriteEngine On
RewriteRule ^id/([0-9]+)/?$ /index.php?id=$1 [NC, L]
我试图从testproject/profile-update/?id=1
的URL
改写为testproject/profile-update/id/1
,但它似乎并没有工作。
我检查了类似的问题,并试图,但没有任何结果:
RewriteEngine On
RewriteBase /public/
RewriteRule ^/public/profile-update/id/([0-9]+)/?$ /public/profile-update/index.php?id=$1 [NC, L]
我在做什么错?
刚刚加载的网址:HTTP':// testproject/profile文件更新/ ID/1'和得到的回应:'请求的URL/profile文件更新/在这台服务器上找不到id/1。' –
任何线索为什么它不起作用? –