url rewriting

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
priscila
Forum Newbie
Posts: 1
Joined: Sun Dec 04, 2011 8:01 pm

url rewriting

Post 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.
User avatar
manohoo
Forum Contributor
Posts: 201
Joined: Wed Dec 23, 2009 12:28 pm

Re: url rewriting

Post by manohoo »

Why are you posting an Apache question in a PHP forum?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: url rewriting

Post by s.dot »

Moved to Installation and configuration.

You can use a regular expression to accept valid characters in place of sd008
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
mnissar
Forum Newbie
Posts: 2
Joined: Sun Feb 26, 2012 1:27 am

Re: url rewriting

Post by mnissar »

Post Reply