.htaccess ReWrite Question

2 posts / 0 new
Last post
#1 Tue, 04/24/2012 - 05:30
PaliGap

.htaccess ReWrite Question

Hi

A customer of mine needs a .htaccess file that will do the following:

Requests for: "http://www.domain.com/something" will be re-written as requests for "http://www.domain.com/index.php?/something"

He already has this, but it does not seem to work:

RewriteEngine On
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

Any ideas?

(CentOS Linux 6.2, VM 3.91 Pro)

Tue, 04/24/2012 - 07:00
PaliGap

Oh - got it!

This: RewriteRule ^(.*)$ /index.php/$1 [L]

Should be: RewriteRule ^(.*)$ /index.php?/$1 [L]

;-)