logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Need help for special redirect
Author
bagu



Joined: 06 Jan 2011
Posts: 193
Location: France

PostPosted: Thu 29 Mar '12 13:40    Post subject: Need help for special redirect Reply with quote

Hello,

I usually use mod rewrite to handle redirect in my vhost, for example :
Code:
   RewriteCond %{HTTP_HOST}   ^bagu.biz [NC]
   RewriteRule ^(.*)         http://www.bagu.biz$1 [R=301,L]


But i have an old domain i don't use anymore, and i want to redirect every request to the root.
But it don't work.

I'v try this :
Code:
   RewriteCond %{HTTP_HOST}   ^hyze.bagu.biz [NC]
   RewriteRule ^(.*)         http://hyze.bagu.biz [R=301,L]


But it don't work.
I want to keep only the root because there is a web page showing a message to ask visitor to refresh their favorites.

Coult you help me please ?

(sorry for my ugly english)
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 29 Mar '12 21:12    Post subject: Re: Need help for special redirect Reply with quote

bagu wrote:

But it don't work.
I want to keep only the root because there is a web page showing a message to ask visitor to refresh their favorites.

(sorry for my ugly english)


What do you want?

Option 1)
hyze.bagu.biz/ redirect
hyze.bagu.biz/bla no redirect

Option 2)
hyze.bagu.biz/ no redirect
hyze.bagu.biz/bla redirect
Back to top


Reply to topic   Topic: Need help for special redirect View previous topic :: View next topic
Post new topic   Forum Index -> Apache