The same address in the browser...

New to mod_rewrite? This is a good place to start.

The same address in the browser...

Postby szmigiel » Sun Mar 05, 2006 7:04 am

Hello,

I need to change :

new.domain.com -> domain.com/new.php
example.domain.com -> domain.com/example.php

now i'm using this code

RewriteEngine on
RewriteCond %{HTTP_HOST} ^new.domain.com$
RewriteRule ^(.*)$ http://domain.com/new.php [R=301,L]

works fine but when I write in browser address new.domain.com it changes to http://domain.com/new.php
How to make the address will be all the time in the browser http://new.domain.com?
I need to redirect to new.php file but I want in the browser still the same address new.domain.com

is it possible ?
szmigiel
 
Posts: 2
Joined: Wed Mar 01, 2006 2:43 pm

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 31 guests

cron