Reputation: 195
I am trying to rewrite url for my php application but its not working.
My directory structure
/var/www/html/test|
|---.htaccess
|---index.php
My .htaccess file content
# Activates URL rewriting (like myproject.com/controller/action/1/2/3)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
apache2ctl -M
result:
rewrite_module (shared)
Server version: Apache/2.4.18 (Ubuntu)
what i did wrong in the process? please help
Upvotes: 0
Views: 29
Reputation: 195
Its Working fine now.
I just change my /etc/apache2/apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
To
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride ALL
Require all granted
</Directory>
Upvotes: 2