I am trying to rewrite
http://localhost/pex/index.php?p=login
to
http://localhost/pex/login
If the re get is set
http://localhost/pex/index.php?p=login&re=users
to
http://localhost/pex/login/re/users
I used http://www.generateit.net/mod-rewrite/ which suggested:
RewriteEngine On
RewriteRule ^pex/([^/]*)/re/([^/]*)$ /pex/index.php?p=$1&re=$2 [L]
This did not work on WAMP and generated no errors with LogLevel = debug.
Note that /pex/ is only a temporary folder, it will eventually be in the root dir.
Try to add this to your httpd.conf
<Directory "/path/to/site">
AllowOverride All
</Directory>
In .htaccess add and this line in first line:
Options +FollowSymlinks
Options +FollowSymlinks RewriteEngine On RewriteRule ^pex/([^/]*)/re/([^/]*)$ /pex/index.php?p=$1&re=$2 [L]
<VirtualHost *:80> DocumentRoot c:/wamp/www/ <Directory "c:/wamp/www/"> AllowOverride All </Directory> </VirtualHost>
This is my httpd.conf