0

I have some shared ftp location on which I am trying to use the Symfony2 Framework.

http://XYZ.com/ABC/Symfony

And All i have is the ftp details and the database.

Please help me to remove web/app.php form the url and that redirects to the main url.

3

1 Answer 1

5

put this in your .htaccess file inside your web/ directory:

<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine On

    # Explicitly disable rewriting for front controllers
    RewriteRule ^app_dev.php - [L]
    RewriteRule ^app.php - [L]

    RewriteCond %{REQUEST_FILENAME} !-f

    # Change below before deploying to production
    #RewriteRule ^(.*)$ app.php [QSA,L]
    RewriteRule ^(.*)$ app_dev.php [QSA,L]
</IfModule>

taken from here - symfony2 rewrite rules .htaccess app.php

Sign up to request clarification or add additional context in comments.

3 Comments

Didn't worked. Still app.php is required and when I am trying XYZ.com/Symfony it is showing error.
try to add DocumentRoot /full/path/to/your/site/web before <IfModule mod_rewrite.c>
You might need to enable the rewrite module (sudo a2enmod rewrite && sudo service apache2 restart)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.