I wrote a Symfony2 web site which is accessed by going to the folder www/Symfony/web/app.php/
What I want to do is have it so when I go to my domain it loads this folder. Currently I am just using the DirectoryIndex keyword in htaccess but I would like the URL to not include all the folders.
In situations like this, if you can’t move the content of your site directly into the public_html folder, then I would recommend continuing to use htaccess. Please try the following code in your htaccess file and let me know if it works. You may also need to keep the default index modification you already have.
RewriteRule ^(.*)$ /Symfony/web/
Please feel free to modify it as needed to fit your situation.
No way to leave a comment so this will have to do. Trying different things I either get Internal Server errors or it causes Symfony to not be able to find various assets (CSS, images, etc).
On setups like this, it may take a bit of trial and error to get the css/images links correct.
I would first attempt relative style links to see if that works in this situation. If not, you could try setting the full link to see if the CSS/Images even load.
Been trying different things. I am running into 2 problems:
1) After a little while I start getting Internal Server Errors. Can I be doing any of this with an .htaccess file within /Symfony/?
2) Addon domains that are in their own folder in public_html/ get Internal Server errors
If you are trying to redirect the root domain (exmaple.com) to use the contents of the sub-folder, the htaccess file would need to be in the top level folder for that domain.
As for the internal server errors, there could be a few issues that might be causing it. At this point, I would recommend that you open a support ticket so that we can take a look in greater detail.
If you don’t mind, could you please reply with the ticket ID once it has been opened?
Ticket submitted. ID: WXJT-97002
You must be Logged In to post an Answer.
Not a member yet? Sign Up Now »