PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > mod_rewrite needed
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

mod_rewrite needed

Réponse
 
LinkBack Outils de la discussion
Vieux 16/10/2006, 21h38   #1
Verona Busch
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut mod_rewrite needed

Hi,

i found out a bit about mod_rewrite and use it like this now:

RedirectMatch permanent ^/oldfile.php.*$
http://www.domain.tld/category/subcategory/newfile.html

Very usefull, but I have another problem, that I can't solve.

I have to redirect all possible wrong categories and subcategories to
just the allowed one's.

That means, this

http://www.domain.tld/wrong_category...1/newfile.html

or this

http://www.domain.tld/wrong_category...2/newfile.html

or what ever is given at the first and the second directory(path/folder)
always has to be like this

http://www.domain.tld/my_category/my_subcategory/

I do not have to care about things after the last '/'. This is solved
through the content management system. But if someone enters something
wrong within the first two categories the cms crashs.

RedirectMatch permanent ^/*/*/$
http://www.domain.tld/my_category/my_subcategory/

That doesn't work.
  Réponse avec citation
Vieux 17/10/2006, 08h12   #2
Davide Bianchi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mod_rewrite needed

On 2006-10-16, Verona Busch <verona.busch@gmx.de> wrote:
> I have to redirect all possible wrong categories and subcategories to
> just the allowed one's.


Why don't you process that in the php page?

Davide

--
We all know Linux is great...it does infinite loops in 5 seconds.
-- Linus Torvalds
  Réponse avec citation
Vieux 17/10/2006, 08h45   #3
Verona Busch
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mod_rewrite needed

Davide Bianchi wrote:
> On 2006-10-16, Verona Busch <verona.busch@gmx.de> wrote:
>> I have to redirect all possible wrong categories and subcategories to
>> just the allowed one's.

>
> Why don't you process that in the php page?
>
> Davide
>

I don't know how to do it with php either. Anyway. I am actually
using the .htaccess redirects for old pages. Isn't it more comfortable?
  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 23h14.


É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,07627 seconds with 11 queries