Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website routing not working on live server #371

Closed
arlg opened this issue Nov 3, 2015 · 4 comments
Closed

Website routing not working on live server #371

arlg opened this issue Nov 3, 2015 · 4 comments

Comments

@arlg
Copy link

arlg commented Nov 3, 2015

Hello,

I migrated my website to the live server today. But I get "Path not found." message when I want to load it. It's the same files and the server configuration supports Cockpit.

What could be wrong in the live server ?

Do I have to change something in the .htaccess ? Is there other configuration variables to change ?

My .htaccess :

<ifModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule !\.(js|ico|gif|jpg|png|css|geojson|json)$ index.php [L]
    RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</ifModule>

Tell me if you need some other informations, I don't know what to do at all :/
I have the feeling that the server always falls back to / event when I try to load other page routes.

Thanks

@baptistebriel
Copy link

+1

@baptistebriel
Copy link

If you're using the latest OVH servers, this solved my issue:
http://www.grafikart.fr/forum/topics/11495

@peterbrinck
Copy link
Contributor

Are you using shared hosting or a VPS where you have SSH access?
If NOT using shared hosting, check if all the files have the correct permissions and the correct owner
If there's no problems there, then maybe it's because of FastCGI.
If you're using FastCGI, of course..

FastCGI doesn't work well with Lime, the micro framework PHP behind Cockpit, that Artur have developed
Me and Artur fixed it with some hacks

$app = new Lime\App([
    'base_url'     => BASE_URL,
    'base_route'   => BASE_ROUTE,
    'route'        => preg_replace('#'.preg_quote(BASE_URL, '#').'#', '', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), 1)
]);

@arlg
Copy link
Author

arlg commented Dec 21, 2016

Thanks @baptistebriel (yes, one year later), it was that OVH issue... I've had it on another website going in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants