Reputation: 127
I have this URL:
http://localhost:8082/sistemaTareas/api/index.php/hello/jean/bergeret
This prints:
HELLO JEAN BERGERET
I need to do the same, but with this:
http://localhost:8082/sistemaTareas/api/hello/jean/bergeret
I need config the .htaccess?
Edit: I saw the other answer, but did not solve my problem. Can anyone guide me?
Upvotes: 0
Views: 1730
Reputation: 310
I think a AllowOverride All
is missing in you website apache configuration, in order to activate your .htaccess.
Your config file should look like this :
<VirtualHost *:80>
ServerName my.server.name
DocumentRoot /path/to/your/website/root
<Directory /path/to/your/website/root >
DirectoryIndex index.php
AllowOverride All <!--Here-->
</Directory>
</VirtualHost>
And your .htaccess like :
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
Upvotes: 1