2

I am using a normal host (i.e access to web pages via public_html and no access to php (apache) configuration).

so here what i did

  1. renamed my web dir => public_html
  2. renamed app.php (prod application) to index.php

I've also added a route to my page (template) named "littlebird"

Problem

when I call www.mywebsite.com/littlebird => 404 page not found

but when I use www.mywebsite.com/index.php/littlebird every thing works just fine.

6
  • You have mod_rewrite turned off Commented Dec 4, 2013 at 0:06
  • @zerkms can u please explain ??? Commented Dec 4, 2013 at 0:08
  • check if mod_rewrite is turned on then check rewrite rules in .htaccess Commented Dec 4, 2013 at 0:09
  • I only have Options -Indexes in my .htaccess @zerkms Commented Dec 4, 2013 at 0:16
  • 2
    then you have lost your .htaccess somewhere. Symfony2 is shipped with a .htaccess with more than 50 lines in total: github.com/symfony/symfony-standard/blob/master/web/.htaccess Commented Dec 4, 2013 at 0:21

2 Answers 2

3

My original guess was that you didn't have the mod_rewrite turned on.

But during our discussion we've found that you have replaced the original .htaccess with something else.

The original .htaccess could be found by this address: https://github.com/symfony/symfony-standard/blob/master/web/.htaccess

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

Comments

0

It seems to me like you don't have a index.php value within DirectoryIndex.

Try editing your .htaccess file that is located in littlebird and adding/updating it with:

DirectoryIndex index.php index.html

7 Comments

It has nothing to do with DirectoryIndex
@Badik Ali: symfony2 requires deep knowledge of how the whole technologies stack works. So I hardly doubt that guessing is a symfony-way.
@BadikAli: OK, you will be able to distinguish Symfony's 404 and Apache 404. So, which one do you get? Have you make sure that .htaccess rewrites you URL to index.php and not app.php?
@jperovic I think Apache 404
OK, then follow @zerkms's suggestion about checking if you have mod_rewrite turned on. Usually, .htaccess has condition checks if it's enabled. The most basic, and quickest/dirtiest, way is to just comment out those <If> tags. If page crashes then with HTTP500, you most probably don't have mod_rewrite...
|

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.