LoginSignup
4
5

More than 5 years have passed since last update.

fuelphpをドキュメントルート以外で使う方法 サブディレクトリ付きにする

Last updated at Posted at 2015-11-19

メモの要旨

http://localhost/hoge/
でfuleを動かした時設定した内容

動作確認環境

  • OS windows 7 64bit
  • Xampp 1.7.3
    c:\xampp で動かす
  • fulephp 1.7.3
    c:\tmp\hoge{fule,html} に設置

apacheの設定

C:\xampp\apache\conf\httpd.conf
に以下追加

httpd.conf
Alias /hoge/ "/tmp/hoge/html/"
<Directory "/tmp/hoge/html/">
   Options Indexes FollowSymLinks Includes ExecCGI
   AllowOverride All
   Order allow,deny
   Allow from all
</Directory>

fuelphpの設定

c:\tmp\hoge\html\.htaccess
の10行目あたり RewriteBase にAliasしたディレクトリを設定

.htaccess
<IfModule mod_rewrite.c>

    RewriteEngine on

    # NOTICE: If you get a 404 play with combinations of the following commented out lines
    #AllowOverride All
    RewriteBase /hoge ←ここ

    # Make sure directory listing is disabled
    Options +FollowSymLinks -Indexes

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5