#author("2025-02-18T00:05:28+09:00","default:fujioka","fujioka") #author("2025-02-18T00:06:24+09:00","default:fujioka","fujioka") .htaccess の設定を変更することで web/ をURLから削除します。 **.htaccess の作成・編集(basic/.htaccess) [#jbab0abf] yii2/basic/ ディレクトリ内に .htaccess を作成(または編集)し、以下の内容を追加してください。 RewriteEngine on # "web" ディレクトリを省略 RewriteCond %{REQUEST_URI} !^/web/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /web/$1 [L] **index.php の編集(basic/index.php) [#kd8d5bc2] basic/index.php を開き、require のパスを web/index.php に向けるように変更します。 basic/index.php を作成し、require のパスを web/index.php に向けるように変更します。 <?php require __DIR__ . '/web/index.php'; **Apache の httpd.conf の設定変更 [#u618f154] ''設定ファイルの場所(例)'' <Directory "C:/xampp/htdocs"> AllowOverride All </Directory> **Apache を再起動 [#ua569eef] 設定を反映するために、XAMPP の Apache を再起動してください。 ---- RIGHT:Today : &counter(today); / Yesterday : &counter(yesterday); / Total : &counter(total);