Yii 2.0/web をURLから削除
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
.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 ...
<?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(yes...
終了行:
.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 ...
<?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(yes...
ページ名:
1