IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

PHP & Base de données Discussion :

url rewritting petit pb


Sujet :

PHP & Base de données

  1. #21
    Membre averti Avatar de beejeridou
    Homme Profil pro
    Webmaster
    Inscrit en
    Février 2007
    Messages
    280
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activité : Webmaster

    Informations forums :
    Inscription : Février 2007
    Messages : 280
    Points : 342
    Points
    342
    Par défaut
    En fait, dans les liens de ton menu, tu n'as pas besoin de mettre ?lang=ta session lang car c'est l'url rewriting qui s'en charge, la tu passes la valeur get langue 2 fois.

    Si tu veux passer la langue en tu fais

    vendez-catiprint-machine-imprimerie-en.html

    ou bien

    vendez-catiprint-machine-imprimerie-<?php echo $_SESSION['lang']; ?>.html

    tu vois?
    Et pourtant... Elle tourne.
    http://www.djib.me

  2. #22
    Membre habitué
    Inscrit en
    Janvier 2008
    Messages
    1 159
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 1 159
    Points : 149
    Points
    149
    Par défaut
    merci tu as raison pour le menu j'ai fait le modifications, mais j'aimerais aussi modifier l'url de la sélection des drapeaux qu'on ne voit pas ?lang=en.


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
     if($_SERVER['SCRIPT_NAME']!='/pages/details.php')
    {
     
    ?>
    <a href="<?php $_SERVER['DOCUMENT_ROOT']?>?lang=fr" title="machine imprimerie catiprint"><img src="<?php echo RACINE ?>images/drapeau_france.gif" alt="machine d'imprimerie, machine d'impression"/></a>
    <a href="<?php $_SERVER['DOCUMENT_ROOT']?>?lang=en" title="machine imprimerie catiprint"><img src="<?php echo RACINE ?>images/drapeau_anglais.gif" alt="machine d'imprimerie, machine d'impression"/></a>
    <a href="<?php $_SERVER['DOCUMENT_ROOT']?>?lang=es" title="machine imprimerie catiprint"><img src="<?php echo RACINE ?>images/drapeau_espagne.gif" alt="machine d'imprimerie, machine d'impression"/></a>
     
     
    <?php 
    }
    else
    {
    ?>
    <a href="produits-catiprint.php?lang=fr" title="machine imprimerie catiprint"><img src="<?php echo RACINE ?>images/drapeau_france.gif"  alt="machine d'imprimerie, machine d'impression"/></a>
    <a href="produits-catiprint.php?lang=en" title="machine imprimerie catiprint"><img src="<?php echo RACINE ?>images/drapeau_anglais.gif" alt="machine d'imprimerie, machine d'impression"/></a>
    <a href="produits-catiprint.php?lang=es" title="machine imprimerie catiprint"><img src="<?php echo RACINE ?>images/drapeau_espagne.gif" alt="machine d'imprimerie, machine d'impression"/></a>
     
    <?php 
    }
    ?>
    merci.

  3. #23
    Membre habitué
    Inscrit en
    Janvier 2008
    Messages
    1 159
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 1 159
    Points : 149
    Points
    149
    Par défaut
    Citation Envoyé par beejeridou Voir le message
    En fait, dans les liens de ton menu, tu n'as pas besoin de mettre ?lang=ta session lang car c'est l'url rewriting qui s'en charge, la tu passes la valeur get langue 2 fois.

    Si tu veux passer la langue en tu fais

    vendez-machine-imprimerie-en.html

    ou bien

    vendez-machine-imprimerie-<?php echo $_SESSION['lang']; ?>.html

    tu vois?

  4. #24
    Membre habitué
    Inscrit en
    Janvier 2008
    Messages
    1 159
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 1 159
    Points : 149
    Points
    149
    Par défaut
    Bonsoir,
    je reviens apres quelques semaine car j'ai des erreurs d exploration de la part de google:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
     
    <?php
    http://www.catiprint.fr/cherchez-catiprint-machine-imprimerie-es.html?lang=es
    	404 (Introuvable) 	2 pages 	9 juil. 2011
    http://www.catiprint.fr/accueil-catiprint-machine-imprimerie-es.html?lang=en
    	404 (Introuvable) 	2 pages 	8 juil. 2011
    http://www.catiprint.fr/pages/produits-catiprint.php?lang=es
    	404 (Introuvable) 	10 pages 	6 juil. 2011
    http://www.catiprint.fr/pages/vendez-machine-imprimerie-catiprint.php?lang=es
    	404 (Introuvable) 	3 pages 	6 juil. 2011
    http://www.catiprint.fr/pages/produits-machine-imprimerie-catiprint.php?lang=es
    	404 (Introuvable) 	3 pages 	6 juil. 2011
    http://www.catiprint.fr/pages/contact-machine-imprimerie-catiprint.php?lang=fr
    	404 (Introuvable) 	3 pages 	5 juil. 2011
    http://www.catiprint.fr/vendez-catiprint-machine-imprimerie-fr.html
    	404 (Introuvable) 	2 pages 	5 juil. 2011
    http://www.catiprint.fr/pages/contact-machine-imprimerie-catiprint.php?lang=es
    	404 (Introuvable) 	3 pages 	5 juil. 2011
    http://www.catiprint.fr/pages/produits-machine-imprimerie-catiprint.php?lang=en
    	404 (Introuvable) 	3 pages 	4 juil. 2011
    http://www.catiprint.fr/cherchez-catiprint-machine-imprimerie-fr.html?lang=en
    	404 (Introuvable) 	2 pages 	4 juil. 2011
    http://www.catiprint.fr/cherchez-catiprint-machine-imprimerie-en.html?lang=es
    	404 (Introuvable) 	2 pages 	4 juil. 2011
    http://www.catiprint.fr/pages/vendez-catiprint.php?lang=fr
    	404 (Introuvable) 	3 pages 	4 juil. 2011
    http://www.catiprint.fr/vendez-catiprint-machine-imprimerie-en.html?lang=es
    	404 (Introuvable) 	2 pages 	4 juil. 2011
    http://www.catiprint.fr/produits-catiprint-machine-imprimerie-en.html?lang=es
    	404 (Introuvable) 	2 pages 	4 juil. 2011
    http://www.catiprint.fr/contact-catiprint-machine-imprimerie-es.html?lang=fr
    	404 (Introuvable) 	2 pages 	4 juil. 2011
    http://www.catiprint.fr/contact-catiprint-machine-imprimerie-es.html?lang=es
    	404 (Introuvable) 	2 pages 	3 juil. 2011
    http://www.catiprint.fr/pages/produits-catiprint.php?lang=fr
    	404 (Introuvable) 	10 pages 	3 juil. 2011
    http://www.catiprint.fr/cherchez-catiprint-machine-imprimerie-en.html
    	404 (Introuvable) 	2 pages 	3 juil. 2011
    http://www.catiprint.fr/accueil-catiprint-machine-imprimerie-es.html?lang=fr
    	404 (Introuvable) 	2 pages 	3 juil. 2011
    http://www.catiprint.fr/pages/contact-machine-imprimerie-catiprint.php?lang=en
    	404 (Introuvable) 	3 pages 	3 juil. 2011
    http://www.catiprint.fr/pages/produits-catiprint.php?lang=en
    	404 (Introuvable) 	10 pages 	3 juil. 2011
    http://www.catiprint.fr/produits-catiprint-machine-imprimerie-es.html?lang=en
    	404 (Introuvable) 	2 pages 	3 juil. 2011
    http://www.catiprint.fr/cherchez-catiprint-machine-imprimerie-es.html
    	404 (Introuvable) 	2 pages 	3 juil. 2011
    http://www.catiprint.fr/pages/contact-catiprint.php?lang=fr
    	404 (Introuvable) 	3 pages 	3 juil. 2011
     
    ..
    1 à 100 sur 103 Suivante?>
    ET VOICI mon .haccess:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    RewriteRule ^machine-imprimerie-accueil-catiprint-([a-z]+).html ./index.php?lang=$1 [QSA]
     
    RewriteRule ^machine-imprimerie-produits-catiprint-([a-z]+).html ./pages/machine-imprimerie-produits-catiprint.php?lang=$1 [QSA]
     
    RewriteRule ^machine-imprimerie-cherchez-catiprint-([a-z]+).html ./pages/machine-imprimerie-cherchez-catiprint.php?lang=$1 [QSA]
     
    RewriteRule ^machine-imprimerie-vendez-catiprint-([a-z]+).html ./pages/machine-imprimerie-vendez-catiprint.php?&lang=$1 [QSA]
     
    RewriteRule ^machine-imprimerie-contact-catiprint-([a-z]+).html ./pages/machine-imprimerie-contact-catiprint.php?&lang=$1 [QSA]
     
     
    RewriteRule ^machine-imprimerie-accueil-catiprint-([a-z]+).html ./?lang=$1 [QSA]
    RewriteRule ^machine-imprimerie-plan-site.html ./machine-imprimerie-plan-site.php [L]
    et cela rentis je pense mon referencement si quelque peut m'aider.

    voici mon menu:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
     
    <li><a href="<?php echo RACINE ?>machine-imprimerie-accueil-catiprint-<?php echo $_SESSION['lang']; ?>.html"><?php echo _MenuPresentation ?></a></li>
    <li><a href="<?php echo RACINE ?>machine-imprimerie-produits-catiprint-<?php echo $_SESSION['lang']; ?>.html"><?php echo _MenuMachinesDispo ?></a></li>
    <li><a href="<?php echo RACINE ?>machine-imprimerie-cherchez-catiprint-<?php echo $_SESSION['lang']; ?>.html"><?php echo _MenuVousCherchez ?></a></li>
    <li><a href="<?php echo RACINE ?>machine-imprimerie-vendez-catiprint-<?php echo $_SESSION['lang']; ?>.html"><?php echo _MenuVousVendez ?></a></li>
    <li><a href="<?php echo RACINE ?>machine-imprimerie-contact-catiprint-<?php echo $_SESSION['lang']; ?>.html"><?php echo _MenuContact ?></a></li>
    et voici mes lien sur mes drapeau je crois que c est la que ca cloche:
    <
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    a href="<?php $_SERVER['DOCUMENT_ROOT']?>?lang=fr" title="machine imprimerie catiprint"><img src="<?php echo RACINE ?>images/machine-imprimerie-drapeau-france.gif" alt="machine d'imprimerie, machine d'impression"/></a>
    <a href="<?php $_SERVER['DOCUMENT_ROOT']?>?lang=en" title="machine imprimerie catiprint"><img src="<?php echo RACINE ?>images/machine-imprimerie-drapeau-anglais.gif" alt="machine d'imprimerie, machine d'impression"/></a>
    <a href="<?php $_SERVER['DOCUMENT_ROOT']?>?lang=es" title="machine imprimerie catiprint"><img src="<?php echo RACINE ?>images/machine-imprimerie-drapeau-espagne.gif" alt="machine d'imprimerie, machine d'impression"/></a>

    mais en fessant comme test:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    "<?php $_SERVER['DOCUMENT_ROOT']?>-<?php echo $_SESSION['lang']; ?>.html"
    ca ne marche pas et document root me renvoie pas a la page ou je suis.
    j'ai error 404.
    merci

Discussions similaires

  1. basic url rewriting petit prob
    Par HoliCApplet dans le forum Apache
    Réponses: 1
    Dernier message: 07/04/2014, 11h56
  2. [MySQL] Petit soucis d'url rewriting
    Par tryan dans le forum PHP & Base de données
    Réponses: 4
    Dernier message: 07/11/2010, 15h16
  3. Petit souci avec URL Rewriting
    Par jhdscript dans le forum Apache
    Réponses: 6
    Dernier message: 18/06/2008, 09h02
  4. [URL Rewriting] Petit problème "basique"
    Par Bloodscalp dans le forum Apache
    Réponses: 6
    Dernier message: 20/02/2008, 17h58
  5. [Débutant]infos ds session sans cookie ? url rewriting ?
    Par Satanas_et_diabolo dans le forum ASP
    Réponses: 8
    Dernier message: 10/10/2006, 17h13

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo