sci-kode 0 Newbie Poster

Hello all!

I just wonder if it's posible to rewrite index.php, index.php?variable=some and the root
to same rewrite in htaccess. If so how?

Here's an example that don't work, but maybe you get the idea.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^myexample.com$
RewriteRule (.*) http://myexample.com/$1 [R=301,L]
RewriteRule ^another-variable-in-url$ /index.php [L]
RewriteRule ^another-variable-in-url$ /index.php?variable=1 [L]

I'm getting the wrong url it end up like this another-variable-in-url?variable=1
Is there a way to fix this?

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.