My current urls look like this [mysite]index.php/[rest of the slug]
.
I want to strip index.php
from these urls.
mod_rewrite
Minor thing: (Optional)
Try restarting your Apache after updating the rewrite engine status in vhosts as
Rewrite ON
.
One critical thing to notice:
In Apache vhosts file, check whether you have this script line
AllowOverride None
If yes, please remove/comment this line.
My vhosts file script: (Before)
DocumentRoot "/path/to/workspace"
ServerName ciproject
ErrorLog "/path/to/workspace/error.log"
CustomLog "/path/to/workspace/access.log" common
Directory "/path/to/workspace">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
My vhosts file script: (After)
DocumentRoot "/path/to/workspace"
ServerName ciproject
ErrorLog "/path/to/workspace/error.log"
CustomLog "/path/to/workspace/access.log" common
Directory "/path/to/workspace">
Options Indexes FollowSymLinks
#AllowOverride None
Order allow,deny
Allow from all
I faced the same problem, struggled for around 1 day, all were fine. Later, by trial and error method, found this thing. After removing this, my job was accomplished. The URL now does not look up for index.php :)