Apache从根目录重写到它的子目录

时间:2018-06-29 15:15:31

标签: php apache mod-rewrite url-rewriting

使用 Ubuntu Apache2 PHP

目录结构

/var/www/html/app

app-
   |- system-
            |- core-files.php
            |- boot.php
   |- myapp
   |- .htaccess

.htaccess

<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^/ (.*) system/boot.php/$1 [QSA,L]
</IfModule>

我正在尝试重写localhost/app/system/boot.php?arg > localhost/app

无论何时在后端进入localhost/app,都将使用localhost/app/system/boot.php?arg,但没有index.php

0 个答案:

没有答案