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 54 55 56 57 58
| Options +FollowSymlinks
RewriteEngine on
RewriteBase /annoncesv1/
#301 > HTTS with www
#RewriteCond %{HTTP_HOST} !^www\. [OR]
#RewriteCond %{SERVER_PORT} 80
#RewriteRule ^(.*) https://www.domain.fr/$1 [QSA,L,R=301]
#301 > HTTS without www
RewriteCond %{HTTP_HOST} ^www\. [OR]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*) https://monsite.fr/$1 [QSA,L,R=301]
### Rewriting / request uri to router.php ###
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/annoncesv1/$
RewriteRule (.*?)$ router.php [QSA,L]
### Rewriting index and general urls ###
RewriteRule ^index.php$ / [R=301]
RewriteRule ^(fr|en|es|it|ru|ar)/index.php$ /annoncesv1/$1/ [R=301,L]
RewriteRule ^(fr|en|es|it|ru|ar)/$ router.php?lang=$1 [L]
RewriteRule ^(fr|en|es|it|ru|ar)$ /$1/ [R]
RewriteRule ^(fr|en|es|it|ru|ar)/index.htm$ router.php [L]
RewriteRule ^(fr|en|es|it|ru|ar)/([.-_/a-z0-9]*).php$ router.php?lang=$1 [QSA]
### Rewriting ulrs ads, shops and page by language ###
RewriteRule ^(fr|en|es|it|ru|ar)/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+-([0-9]+)$ router.php?lang=$1&id=$2 [QSA]
RewriteRule ^(fr|en|es|it|ru|ar)/[ء-يa-zA-ZA-Яа-я0-9-]+$ router.php?lang=$1 [L,QSA]
RewriteRule ^(fr|en|es|it|ru|ar)/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+$ router.php?lang=$1 [L,QSA]
RewriteRule ^(fr|en|es|it|ru|ar)/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+$ router.php?lang=$1 [L,QSA]
RewriteRule ^(fr|en|es|it|ru|ar)/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+$ router.php?lang=$1 [L,QSA]
RewriteRule ^(fr|en|es|it|ru|ar)/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-Z0-9-]+$ router.php?lang=$1 [L,QSA]
### Rewriting ulrs ads, shops and page whithout language ###
RewriteRule ^[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+-([0-9]+)$ router.php?id=$1 [QSA]
RewriteRule ^[ء-يa-zA-ZA-Яа-я0-9-]+$ router.php [L]
RewriteRule ^[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+$ router.php [L]
RewriteRule ^[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+$ router.php [L]
RewriteRule ^[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+$ router.php [L]
RewriteRule ^[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+/[ء-يa-zA-ZA-Яа-я0-9-]+$ router.php [L]
### Rewriting all urls containing a php script name ###
RewriteCond %{HTTP_HOST} ^troc\hebergement\.net
RewriteCond %{REQUEST_FILENAME} (.*)+\.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*?)$ router.php [QSA,L]
ErrorDocument 404 https://monsite.fr/404 |
Partager