Reputation: 1323
This simple rewrite is not working. I have already tested this on my server that runs linux and it works. http://www.lokislayer.com/mvc/bob -- page displays bob like it should --
localhost does not work with xampp installed:
.htaccess file
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]enter code here
Simple index.php File
<?php
$url = $_GET['url'];
echo $url;
?>
Error Message from php : Notice: Undefined index: url in E:\XAMPP\htdocs\mvc\source\index.php on line 3
The code does not work unless I remove the 2nd RewriteCond. I do have mod rewrite working because on the same xampp installation I am running MagentoCE 1.8.
Upvotes: 0
Views: 1532
Reputation: 784898
Make sure to place above code in DOCUMENT_ROOT/mvc/source/.htaccess
and have your code like this:
Options +FollowSymLinks -MultiViews
RewriteEngine on
RewriteBase /mvc/source/
RewriteRule ^([^.]+)/?$ index.php?url=$1 [QSA,L]
Important change is the use of RewriteBase
Upvotes: 1