0

我正在跑步XAMPP并试图捕捉对我的所有请求Directory

http://localhost/apiindex.php在 - 文件夹中api工作和服务

我不知道重写是否有效,因为所有请求都http://localhost/api/whateverhttp://localhost/dashboard

httpd.conf

Alias /api "F:/src/api"

<Directory "F:/src/api">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
</Directory>

.htaccess(在我的F:\src\api文件夹中)

据我所知,这应该将所有请求重定向到,index.php但它没有

Options -MultiViews

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L,NC,QSA]
</IfModule>

我怎样才能让我的重写工作?

4

0 回答 0