william83 Posted September 30, 2009 Share Posted September 30, 2009 J'ai une fusion à résoudre:Comment écrire dans le même fichier htaccess le script qui fait fonctionner ps 1.2 (OVH oblige) avec en plus celui d'une protection de répertoire, le temps de mettre en place mes gammes de produits.A savoir: SetEnv PHP_VER 5 SetEnv REGISTER_GLOBALS 0 # URL rewriting module activation RewriteEngine on # URL rewriting rules RewriteBase / RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E] RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E] RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E] # Catch 404 errors ErrorDocument 404 /404.php === plus la demande d'authentification suivante: AuthType Basic AuthName "Protection du repertoire ps - en preparation" AuthUserFile /home.44/g/r/a/grandordc/www/comptoir/.htpasswd require valid-user Sachant que les 2 ensembles font afficher une page d'erreur.Merci pour votre aideCordialement à tous Link to comment Share on other sites More sharing options...
liandri Posted September 30, 2009 Share Posted September 30, 2009 Bonjour,Peux-tu me montrer l'htaccess modifié par tes soins et qui tiens compte de cette fusion ? Link to comment Share on other sites More sharing options...
william83 Posted October 1, 2009 Author Share Posted October 1, 2009 Voici: SetEnv PHP_VER 5 SetEnv REGISTER_GLOBALS 0 # URL rewriting module activation RewriteEngine on # URL rewriting rules RewriteBase / RewriteRule ^([0-9]+)-([a-zA-Z0-9-]*).html(.*)$ product.php?id_product=$1$3 [L,E] RewriteRule ^([0-9]+)-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E] RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E] RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E] AuthType Basic AuthName "Protection du repertoire modif - administrateur du site" AuthUserFile /home.44/g/r/a/grandordc/www/comptoir/.htpasswd require valid-user # Catch 404 errors ErrorDocument 404 /404.php :-S Link to comment Share on other sites More sharing options...
jolvil Posted October 1, 2009 Share Posted October 1, 2009 EDIT: post déplacé Link to comment Share on other sites More sharing options...
william83 Posted October 1, 2009 Author Share Posted October 1, 2009 - Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now