I'm having problems with .htaccess rewrite rule.

I want to convert:

http://www.domain.com/?d=SOME_STRING

To:

http://www.domain.com/download.php?file=SOME_SRING

So far I've some up with this:

Options +FollowSymlinks
RewriteEngine on

RewriteRule @|\?d=(.+)$ download.php?file=$1

Anyone have an idea on why this isn't working?

*mod rewrite is enabled*

Try this.

RewriteEngine On
RewriteRule ^download\.php\?file\=([^/]*)$ /?d=$1 [L]

Again without success. I've tried every possible combination, I've posted on multiple forums, tried everything people told me, but I can't seem to get it working.

Any other ideas?

*INFO:
I have root web folder at /var/www, in that folder I have subdomains. Should I put the .htaccess in root web folder or in one of the subdomain folders? Does it even matter?

Main question...Is your domain htaccess supports?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.