How do I get mod_rewrite to work with EasyPHP?

My mod_rewrite is not working. This is the mod_rewrite section:

<IfModule mod_rewrite.c> Options +FollowSymlinks # Options +SymLinksIfOwnerMatch RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] </IfModule> 

It works like a charm on Ubuntu and OS X, but does not work on EasyPHP under Windows. I uncommented the following line in apache configuration:

 LoadModule rewrite_module modules/mod_rewrite.so 

And I installed every single AllowOverride directive for All (this is just a local server, so it is not related to security). The vhost entry for a particular vhost that I would like to include mod_rewrite on is as follows:

 <VirtualHost 127.0.0.1> DocumentRoot "E:/Dropbox/Websites/mysite/public" ServerName myvhost.mysite <Directory "E:/Dropbox/Websites/mysite/public"> Options FollowSymLinks Indexes RewriteEngine On AllowOverride All Order allow,deny Allow from all #Deny from all Require all granted </Directory> </VirtualHost> 

If I put "die" at the top of the index.php file in my shared folder, this will never happen, so it seems that mod alteration never tried to redirect it to index.php. All I get is 404s.

+4
source share
1 answer

See this answer:

easyphp and .htaccess

The default Apache installation in EasyPHP did not activate the ability to use .htaccess files to change the server configuration in folders.

You must tell Apache which configuration can be changed with .htaccess files and in which folder. To enable all configuration changes on the main web server, you must edit http.conf (in the Apache / conf folder) and find

Hope this helps :)

0
source

All Articles