Htaccess Rewrite Rule 2

I need to use .htacces to rewrite an url:

http://sd0008/test/index.php?fa=12& er=12& wewe=12

Should become:
http://sd0008.marcel.local/test/index.php?fa=12& er=12& wewe=12

I myself had the following:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !sd0008.marcel.local
RewriteRule ^ http://sd0008.marcel.local%{REQUEST_URI} [L,R=301]

However, i don’t want to have ‘sd0008’ hard coded.

Leave a Reply

Your email address will not be published. Required fields are marked *