htaccess does not work in "online" subdirectory

Asked

Viewed 54 times

2

I made a small script that runs locally inside a folder (localhost/sistema) so far all right, the problem started to happen after I tried to upload that same script to an online server (Hostgator), what happens is that the requests in the url are not captures/sent to index.php

ex:

URL local: localhost/sistema/aa/bb

URL online: sistema.com/sistema/aa/bb

the return of $_SERVER['PHP_SELF']

Local URL: /sistema/index.php/aa/bb

Online URL: /sistema/index.php

That is, the entire URI is not captured on the online server.

htaccess:

Options +FollowSymlinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php/$1 [QSA,L]

What can it be?

  • The last line shouldn’t be RewriteRule (.*) index.php/$1 [QSA,L]?

  • Same behavior

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.