Development

HowToRedirectPublicHtmlToWebFolder (diff)

You must first sign up to be able to contribute.

Changes from Version 1 of HowToRedirectPublicHtmlToWebFolder

Show
Ignore:
Author:
smeves (IP: 68.40.176.156)
Timestamp:
05/10/06 17:49:49 (12 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowToRedirectPublicHtmlToWebFolder

    v0 v1  
     1'''How To Install Your Symfony App On A Shared Host To Your Root Domain With No vhost.conf Access''' 
     2 
     3If you upload your new symfony site to a shared host, and put all of symfony's files into your ~/public_html/ directory, the symfony application is served up with a "/web" at the end. There are a few ways to serve your site up at the root of the domain without having all of your symfony files stored in public_html. Here is one way you can to get around this issue without reinstalling symfony and without access to your vhost.conf or httpd.conf file. 
     4 
     51. Copy all the symfony files from ~/public_html over to a new ~/symfony directory: 
     6{{{ 
     7cp ~/public_html/* ~/symfony 
     8}}} 
     92. Move the ~/public_html directory to a backup: 
     10{{{ 
     11cp ~/public_html ~/public_html.bkp 
     12}}} 
     133. Create a new symlink that points ~/public_html to symfony's web directory 
     14{{{ 
     15ln -s ~/symfony/web/ ~/public_html 
     16}}} 
     174. Now, for some reason the .htaccess file from the old public_html folder didn't get copied. So, make sure copied it over to ~/symfony/web/: 
     18{{{ 
     19cp ~/public_html.bkp/.htaccess ~/public_html 
     20# note the new public_html folder actually points to ~/symfony/web 
     21}}} 
     225. Finally edit the .htaccess file in the ~/symfony/web folder so that all requests are directed to just "index.php" file rather than "web/index.php" like it used to be: 
     23{{{ 
     24RewriteRule ^(.*)$ /index.php [QSA,L] 
     25#RewriteRule ^(.*)$ /web/index.php [QSA,L] 
     26}}}  
     276. One last thing... Make sure to change permissions on the cache and log folders: 
     28{{{ 
     29chmod 777 -R ~/symfony/log ~/symfony/cache 
     30}}} 
     31 
     32DRAFT