Reputation: 57119
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteRule ^(.*)$ index.php?q=$1 [L]
This should rewrite any url to index.php?q={url}, and it's working. Anyway, http://www.domain.com/
just show a blank page. How can I rewrite / to index.php? (http://www.domain.co.il/index.php
dosen't show a blank page..)
BTW: This code's redirecting and not rewriting, why is it?
Thanks.
Upvotes: 0
Views: 137
Reputation:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ index.php?q=$1 [L]
Upvotes: 0
Reputation: 99751
You'll need to set DirectoryIndex
in your .htaccess
file:
DirectoryIndex index.php
Upvotes: 2