0
共有ホスティングプランにSymfony 1.4をインストールする際に役立つ情報がたくさんありましたが、私は一日中混乱してしまいました。共有ホスティングのSymfony 1.4パスから 'web'を削除しますか?
に行くと、ファイルの代わりにhttp://www.alternium.net/jobeet/web/index.phpが返されます。
/jobeet/.htaccess:
Options +FollowSymLinks +ExecCGI
# Enable rewrite engine and route requests to framework
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_URI} ^/robots.txt
RewriteRule ^(.*)$ /jobeet/web/robots.txt [L]
# resources
RewriteCond %{REQUEST_URI} ^/images/ [OR]
RewriteCond %{REQUEST_URI} ^/js/ [OR]
RewriteCond %{REQUEST_URI} ^/fonts/ [OR]
RewriteCond %{REQUEST_URI} ^/css/
RewriteRule ^(.*)$ /jobeet/web/$1 [L]
RewriteCond %{REQUEST_URI} !^/jobeet/web/
RewriteCond %{REQUEST_URI} !^/frontend_dev.php
RewriteRule ^(.*)$ /jobeet/web/index.php/$1 [QSA,L]
RewriteCond %{REQUEST_URI} frontend_dev.php
RewriteRule ^$ /jobeet/web/$1 [QSA,L]
が/jobeet/web/.htaccess:私は「どこ
Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase/
# we skip all files with .something
#RewriteCond %{REQUEST_URI} \..+$
#RewriteCond %{REQUEST_URI} !\.html$
#RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteCond %{REQUEST_URI} !\.php
#RewriteCond %{REQUEST_URI} !\.php
RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
はsymfonyののIまたは書き換えルールより良い理解と誰も私を伝えることができます間違ってる?
私はこのレベルの抽象化をお勧めしますが、私たちは時が経つにつれて、この設定はほとんどの人にとっては思えませんが、私はできる限り時間を節約する必要があるので、私のために、ほとんどすべてのケースで最高になるだろう。 –
これは最も簡単な解決策になるでしょう - それを達成するには2行のコードが必要です。 Webディレクトリを移動するためのhttp://www.symfony-project.org/jobeet/1_4/Propel/en/22#chapter_22_customizing_the_directory_structureを参照し、それに応じてフロントコントローラのrequireパスを調整してSymfonyファイルを探します。 – richsage