Site5 - Built For Designers & Developers MENU

How can I point my domain to my Symfony app?

[2 Grey Star Level]

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.

Answer #1

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.

RewriteEngine On
RewriteRule ^(.*)$ /Symfony/web/

Please feel free to modify it as needed to fit your situation.

Answers Answered By: joliver [476 Blue Star Level]

Answer #2

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).

Answers Answered By: Ryanzero [2 Grey Star Level]

Answer #3

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.

Answers Answered By: joliver [476 Blue Star Level]

Answer #4

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

Answers Answered By: Ryanzero [2 Grey Star Level]

Answer #5

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?

Answers Answered By: joliver [476 Blue Star Level]

Answer #6

Ticket submitted. ID: WXJT-97002

Answers Answered By: Ryanzero [2 Grey Star Level]

Answer this Question

You must be Logged In to post an Answer.

Not a member yet? Sign Up Now »

Money Back Guarantees
Click to verify BBB accreditation and to see a BBB report.