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.

seddik
  • 639
  • 1
  • 8
  • 20

2 Answers2

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

zerkms
  • 249,484
  • 69
  • 436
  • 539
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
Jovan Perovic
  • 19,846
  • 5
  • 44
  • 85
  • It has nothing to do with `DirectoryIndex` – zerkms Dec 04 '13 at 00:06
  • @Badik Ali: symfony2 requires *deep* knowledge of how the whole technologies stack works. So I hardly doubt that *guessing* is a symfony-way. – zerkms Dec 04 '13 at 00:07
  • @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`? – Jovan Perovic Dec 04 '13 at 00:09
  • @jperovic I think Apache 404 – seddik Dec 04 '13 at 00:11
  • 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 `` tags. If page crashes then with HTTP500, you most probably don't have `mod_rewrite`... – Jovan Perovic Dec 04 '13 at 00:15
  • I only have **Options -Indexes** in my .htaccess @jperovic – seddik Dec 04 '13 at 00:16
  • Are you referring to `littlebird/.htaccess` file? That file should contain a lot of lines (like 20-ish or 30-ish) – Jovan Perovic Dec 04 '13 at 00:18