J'utilise joomla(1.0.15) et la ré-écriture d'url.
Je viens de changer de composant en passant de 404SEF à sh404SEF.
Avec ce nouveau composant l'optimisation des urls est différente et je souhaite rediriger les anciennes vers les nouvelles en attendant que tout cela se régularise (effacement des anciennes de l'index google et dans les sites nous référençant).
Je tente de faire cela.
CODE
RewriteRule ^repertoire/mot1-mot2mot3.html$ /repertoire/mot1-mot2-mot3.html
mais cette ré_écriture n'est pas prise en compte et j'ai un message 404 avec l'url d'origine.
Le but est d'obtenir :
1)requête envoyée : hxxp://www.nomsociete.com/repertoire/mot1-mot2mot3.html
2)requête à soumettre au rewrite du composant : hxxp://www.nomsociete.com/repertoire/mot1-mot2-mot3.html
3)requête envoyée à joomla :hxxp://www.nomsociete.com/index.php?option=com_content&Itemid=111&id=31&lang=fr&task=view
le 2->3 se fait mais pas le 1->2
Je ne dois pas prendre par le bon bout la manière dont Apache utilise le htaccess.
Mon htaccess contient ceci:
CODE
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
########## Ré-criture temporaire des urls pour les liens actifs chez les partenaires ou annuaires
RewriteRule ^mot1-mot2mot3.html$ /mot1-mot2-mot3.html
########## FIN Ré-criture temporaire des urls pour les liens actifs chez les partenaires ou annuaires
########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
#
DirectoryIndex index.php
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section
#######################################
#Ré-ecriture des Url nom-societe.com en nom-societe.fr
RewriteCond %{HTTP_HOST} ^www.nomsociete.fr$ [OR]
RewriteCond %{HTTP_HOST} ^nomsociete.fr$ [OR]
RewriteCond %{HTTP_HOST} ^nom-societe.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.nom-societe.com$ [OR]
RewriteCond %{HTTP_HOST} ^nom-societe.fr$
RewriteRule ^(.*) http://www.nom-societe.fr/$1 [QSA,L,R=301]
#######################################
##########
#pour OVH : SetEnv REGISTER_GLOBALS 0 (passage en register global OFF),
SetEnv REGISTER_GLOBALS 0
##########
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits
RewriteEngine On
RewriteBase /
########## Ré-criture temporaire des urls pour les liens actifs chez les partenaires ou annuaires
RewriteRule ^mot1-mot2mot3.html$ /mot1-mot2-mot3.html
########## FIN Ré-criture temporaire des urls pour les liens actifs chez les partenaires ou annuaires
########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
#
DirectoryIndex index.php
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section
#######################################
#Ré-ecriture des Url nom-societe.com en nom-societe.fr
RewriteCond %{HTTP_HOST} ^www.nomsociete.fr$ [OR]
RewriteCond %{HTTP_HOST} ^nomsociete.fr$ [OR]
RewriteCond %{HTTP_HOST} ^nom-societe.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.nom-societe.com$ [OR]
RewriteCond %{HTTP_HOST} ^nom-societe.fr$
RewriteRule ^(.*) http://www.nom-societe.fr/$1 [QSA,L,R=301]
#######################################
##########
#pour OVH : SetEnv REGISTER_GLOBALS 0 (passage en register global OFF),
SetEnv REGISTER_GLOBALS 0
##########
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits
Je suis en mutualisé chez Ovh.
Que fais-je de mal ?
Est-ce l'ordre des instructions ?
Je ne suis pas un spécialiste du htaccess et je tatonne beaucoup dans ce domaine (notamment).
Merci de vos réponses.