Welcome! Log In Create A New Profile

Advanced

Help : Apache configuration translation

Posted by newty 
Help : Apache configuration translation
December 14, 2011 04:46PM
Hello,

I'm not very good for nginx rewrites (just bases) and I would like to know if someone car give me the equivalent to this apache configuration :

AddDefaultCharset UTF-8

RewriteEngine on

##### changer NDD par votre nom de domaine ########

#Anti-duplicate sur le avec et sans www
RewriteCond %{HTTP_HOST} ^ndd\.com$ [NC]
RewriteRule ^(.*)$ http://www.ndd.com/$1 [R=301,L]

#Anti-hotlink
#RewriteCond %{HTTP_REFERER} !^$
#RewriteCond %{HTTP_REFERER} !^http://www.ndd.com/.*$ [NC]
#RewriteCond %{HTTP_REFERER} !^http://www.ndd.com$ [NC]
#ReWriteRule .*\.(gif|png|jpeg|jpg|js)$ - [L,F]

#A modifier avec ce que vous avez mis dans le fichier de config
RewriteRule ^sites-chauds/([a-zA-Z0-9\-_]+)\.php /page.php?page_nom=$1 [L,QSA]
RewriteRule ^site/([a-zA-Z0-9\-_]+)/([0-9]+) /site_detail.php?site=$2 [L,QSA]
RewriteRule ^categorie/([a-zA-Z0-9\-_]+)-([0-9]+)\.html /categorie.php?cat=$1&page=$2 [L,QSA]
RewriteRule ^categorie/([a-zA-Z0-9\-_]+)\.html /categorie.php?cat=$1 [L,QSA]
RewriteRule ^([a-zA-Z0-9\-_]+)/top-sites\.php /index.php?tri=top_sites [L,QSA]
RewriteRule ^([a-zA-Z0-9\-_]+)/nouveautes-([0-9]+)\.php /index.php?tri=nouveautes&page=$2 [L,QSA]
RewriteRule ^([a-zA-Z0-9\-_]+)/nouveautes\.php /index.php?tri=nouveautes [L,QSA]
RewriteRule ^([a-zA-Z0-9\-_]+)/aleatoires\.php /index.php?tri=aleatoires [L,QSA]


#Ne pas toucher
RewriteRule ^sitemap\.xml /sitemap.php [L,QSA]

#Redirect des page 404 sur l'index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /index.php [L,R=301]

Thank you for your help :)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 120
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready