删除index.php Htaccess

I'm trying to remove the index.php and still keep some query informations. This is what I'm trying to use:

RewriteCond     %{REQUEST_FILENAME}     !-f
RewriteCond     %{REQUEST_FILENAME}     !-d
RewriteCond     %{REQUEST_FILENAME}     !(index.php)    [NC]
RewriteRule     ^(.*)$ vika-flyt.dk/index.php?rw=true   [L]

This works for one of my other sites, which is hosted on another server. On the domain where it is working, I have to use something like this:

/home/web/domain_acount_name/domain.dk/index.php?rw=true

But I don't know the "full-directory" link for this website. I think that's the problem.

RewriteRules operate locally for the directory where you placed the .htaccess. And usually you don't have to include the domain at all in the target URL, except if you need to do a redirection.

Try replacing the line containing the RewriteRule with this:

RewriteRule     ^(.*)$ /index.php?rw=true   [L]

And if that doesn't work, you might need to define a RewriteBase to tell mod_rewrite where your webapplication is located. (For example if it's not at domain.com but rather at domain.com/app you need to set RewriteBase to app/.)