http://blog.szalega.pl/3/instalacja-symfony-w-homepl
Opisano sposób dla hostingu home.pl, ale na linuxpl.com też działa więc i na innych pewnie też.

U mnie wszystkie pliki symfony są w folderze sf_sandbox, więc żeby linki wyglądały poprawnie mam w .htaccess:
<?php Options +FollowSymLinks +ExecCGI <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ /sf_sandbox/web/$1 </IfModule> ?>
Plik .htaccess umieszczamy w katalogu public_html/ - ja tam mam folder sf_sandbox z wszystkimi plikami symfony i tenże plik .htaccess.
Do tego pliku nie dodajemy:
<?php # 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] # 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] ?>
bo to już jest w pliku .htaccess w sf_sandbox\web.
Żeby jak jest formularz i po kliknięciu na submit nie dodawało do adresu url: "sf_sandbox/web" robimy:
<?php if (isset($this->pathInfoArray['SCRIPT_NAME']) && preg_match('#^/sf_sandbox/web/#', $this->pathInfoArray['SCRIPT_NAME'])) { $this->pathInfoArray['SCRIPT_NAME'] = preg_replace('#^/sf_sandbox/web/#', '/', $this->pathInfoArray['SCRIPT_NAME']); } ?>
Po tym należy wyczyścić cache.
Może się to komuś przyda, jak będzie miał problem.
