Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Routing failed with htaccess #4667

Closed
Closed
@arcanis

Description

@arcanis

Hi,

Here is my htaccess. When I try to access to the route /Goog/polls, it says No route found for "GET g/polls".
I think the problem come from a substr, because the only significant difference in $_ENV is the variable REQUEST_URI :

fail : string(23) "/app_dev.php/Goog/polls"
ok   : string(27) "/web/app_dev.php/Goog/polls"
                                   ^-- the '/' and the 'g' matches

htaccess

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /web/$1 [L]

edit It probably comes from Symfony\Component\HttpFoundation\Request::preparePathInfo or something like that. That's strange, because my PATH_INFO env var is correctly set. Why does it want to use REQUEST_URI instead ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions