Page 1 of 1

url rewriting

Posted: Sun Dec 04, 2011 8:07 pm
by priscila
I need to use .htaccess to rewrite an url:

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

Should become:
http://sd0008.marcel.local/test/index.p ... 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]

It is working fine. But however, i don't want to have 'sd0008' hard coded.

Re: url rewriting

Posted: Tue Dec 06, 2011 1:37 pm
by manohoo
Why are you posting an Apache question in a PHP forum?

Re: url rewriting

Posted: Tue Dec 06, 2011 11:16 pm
by s.dot
Moved to Installation and configuration.

You can use a regular expression to accept valid characters in place of sd008

Re: url rewriting

Posted: Sun Feb 26, 2012 1:42 am
by mnissar