php – Running Silex on the shared provider

Question:

I just uploaded a site to Locaweb on a simple shared Linux hosting, but for a change it didn't work.

I imagine it's because the index is not in the root of the site, but inside the public folder. Question: How do I make the index inside public work, since I can't change the virtualhost configuration?

Thank you Ps. the htaccess looks like this:

RewriteEngine on
#AddHandler php53-script .php .php5 .php53 .pht .phtm .phtml
#suPHP_ConfigPath /home/site1389376316/
AddHandler php55-script .php
DirectoryIndex public/index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?p=$1 [QSA]

I managed to solve the problem in parts. I made a small change to htaccess.

I removed this line:

DirectoryIndex public/index.php

And I changed this:

RewriteRule ^(.*)$ public/index.php?p=$1 [QSA]

This way the site loads but as a consequence the image files, css, js that are all in the public folder are not found.

What can I do?

Answer:

Sorted out. I changed to a reseller plan there I can change the document_root of the site and everything is fine now.

Thanks

Scroll to Top