PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > A unique htaccess config for an htaccess guru!
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

A unique htaccess config for an htaccess guru!

Réponse
 
LinkBack Outils de la discussion
Vieux 23/04/2006, 22h37   #1
rkeddie@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut A unique htaccess config for an htaccess guru!

Has this been done before or can it be done and if so can you tell me
how?

I have 10 different domains pointing at one specific server with its
own domain.
The only time people should be able to reach my server with those 10
domains is when there is a specific page it is going to...otherewise if
it is just the domain name as the url, I dont want them showing up at
site at all. So i want to redirect people that are using the root
address somewhere else but allow those using the root address with a
certain page..make sense? For instance:

Can i do this?:

Redirect www.domain1-10.com/ to http://www.maindomain.com/error.htm
(????)

So that if someone types in just www.domain1-10.com, they will not be
allowed but redirected to an error page but if they
go to a url such as http://www.domain1-10.com/catalog/pr...dex.htm...then
they
will allowed

Will such a redirect as I have above prevent the url www.domain1-10.com
working for anything at all even if it is a specific page access ?

I know...weird but I need this to be so.

Please advise anyone. If you could, give me the actual htaccess
configuration that will do this? Thankyou!

  Réponse avec citation
Vieux 24/04/2006, 01h03   #2
Peter Chant
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: A unique htaccess config for an htaccess guru!


  Réponse avec citation
Vieux 25/04/2006, 17h51   #3
phil-news-nospam@ipal.net
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: A unique htaccess config for an htaccess guru!

In comp.infosystems.www.servers.unix rkeddie@gmail.com wrote:

| Has this been done before or can it be done and if so can you tell me
| how?
|
| I have 10 different domains pointing at one specific server with its
| own domain.
| The only time people should be able to reach my server with those 10
| domains is when there is a specific page it is going to...otherewise if
| it is just the domain name as the url, I dont want them showing up at
| site at all. So i want to redirect people that are using the root
| address somewhere else but allow those using the root address with a
| certain page..make sense? For instance:
|
| Can i do this?:
|
| Redirect www.domain1-10.com/ to http://www.maindomain.com/error.htm
| (????)
|
| So that if someone types in just www.domain1-10.com, they will not be
| allowed but redirected to an error page but if they
| go to a url such as http://www.domain1-10.com/catalog/pr...dex.htm...then
| they
| will allowed
|
| Will such a redirect as I have above prevent the url www.domain1-10.com
| working for anything at all even if it is a specific page access ?

I have not tested this for what you are doing, but I have used this
directive for some other things. This could be in the virtualhost
section of httpd.conf, or should work in .htaccess too.

RedirectMatch permanent ^/$ http://main.domain.to.see/whatever.html

You might want to also do:

RedirectMatch permanent ^/default\..* http://main.domain.to.see/whatever.html
RedirectMatch permanent ^/index\..* http://main.domain.to.see/whatever.html

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
  Réponse avec citation
Vieux 25/04/2006, 17h51   #4
phil-news-nospam@ipal.net
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: A unique htaccess config for an htaccess guru!

In comp.infosystems.www.servers.unix rkeddie@gmail.com wrote:

| Has this been done before or can it be done and if so can you tell me
| how?
|
| I have 10 different domains pointing at one specific server with its
| own domain.
| The only time people should be able to reach my server with those 10
| domains is when there is a specific page it is going to...otherewise if
| it is just the domain name as the url, I dont want them showing up at
| site at all. So i want to redirect people that are using the root
| address somewhere else but allow those using the root address with a
| certain page..make sense? For instance:
|
| Can i do this?:
|
| Redirect www.domain1-10.com/ to http://www.maindomain.com/error.htm
| (????)
|
| So that if someone types in just www.domain1-10.com, they will not be
| allowed but redirected to an error page but if they
| go to a url such as http://www.domain1-10.com/catalog/pr...dex.htm...then
| they
| will allowed
|
| Will such a redirect as I have above prevent the url www.domain1-10.com
| working for anything at all even if it is a specific page access ?

I have not tested this for what you are doing, but I have used this
directive for some other things. This could be in the virtualhost
section of httpd.conf, or should work in .htaccess too.

RedirectMatch permanent ^/$ http://main.domain.to.see/whatever.html

You might want to also do:

RedirectMatch permanent ^/default\..* http://main.domain.to.see/whatever.html
RedirectMatch permanent ^/index\..* http://main.domain.to.see/whatever.html

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
  Réponse avec citation
Vieux 25/04/2006, 17h51   #5
phil-news-nospam@ipal.net
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: A unique htaccess config for an htaccess guru!

In comp.infosystems.www.servers.unix rkeddie@gmail.com wrote:

| Has this been done before or can it be done and if so can you tell me
| how?
|
| I have 10 different domains pointing at one specific server with its
| own domain.
| The only time people should be able to reach my server with those 10
| domains is when there is a specific page it is going to...otherewise if
| it is just the domain name as the url, I dont want them showing up at
| site at all. So i want to redirect people that are using the root
| address somewhere else but allow those using the root address with a
| certain page..make sense? For instance:
|
| Can i do this?:
|
| Redirect www.domain1-10.com/ to http://www.maindomain.com/error.htm
| (????)
|
| So that if someone types in just www.domain1-10.com, they will not be
| allowed but redirected to an error page but if they
| go to a url such as http://www.domain1-10.com/catalog/pr...dex.htm...then
| they
| will allowed
|
| Will such a redirect as I have above prevent the url www.domain1-10.com
| working for anything at all even if it is a specific page access ?

I have not tested this for what you are doing, but I have used this
directive for some other things. This could be in the virtualhost
section of httpd.conf, or should work in .htaccess too.

RedirectMatch permanent ^/$ http://main.domain.to.see/whatever.html

You might want to also do:

RedirectMatch permanent ^/default\..* http://main.domain.to.see/whatever.html
RedirectMatch permanent ^/index\..* http://main.domain.to.see/whatever.html

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 08h05.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11982 seconds with 13 queries