Hello,
Je viens de préparer la config d'un serveur dédié afin de logiquement y mettre en ligne un site. Mon problème est qu'en local, le fichier .htaccess qui réécrit mes urls fonctionne mais dès que je mets le site en ligne, on dirait que apache bypass complètement le fichier car les urls réécrites ne fonctionne plus et dans le log apache, j'ai une erreur (no such file or directory - pas de fichier ou de répertoire).
mod_rewrite et mod_proxy sont pourtant chargés et AccessFileName .htaccess est activé.
Vous n'auriez pas une petite idée?
Voici le htaccess:
Voici ce que j'ai dans mon log rewrite pour une requête:
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 Options +FollowSymlinks RewriteEngine on RewriteBase / ## Http referers ## RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://ip_du_site/.*$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?le_site.com/.*$ ## Deny hotlinking ## RewriteRule .*\.(png|swf|flv|mp3|mp4|jpe?g|js)$ - [N,F,L] ## Error documents ## ErrorDocument 400 /index.php?id=404 ErrorDocument 401 /index.php?id=404 ErrorDocument 402 /index.php?id=404 ErrorDocument 403 /index.php?id=404 ErrorDocument 404 /index.php?id=404 ErrorDocument 500 /index.php?id=404 ## Deny access to dirs ## RewriteCond %{REQUEST_URI} !^/dir/ ## Rewrite urls ## RewriteRule ^([a-z]+)/([0-9a-zA-Z-_.*]+)$ /index.php?id=$1&fx=$2 [L,NC] RewriteRule ^([0-9a-zA-Z-]+)$ /index.php?id=$1 [L,NC]
J'ai aussi essayé le Options -MultiViews, les AllowOverride du dossier sont All... En gros, je désespère...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f21ba0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/ -> xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f21ba0/initial] (3) [perdir /var/www/html/] applying pattern '.*\.(png|swf|flv|mp3|mp4|jpe?g|js)$' to uri '' xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f21ba0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/ -> xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f21ba0/initial] (3) [perdir /var/www/html/] applying pattern '^([a-z]+)/([0-9a-zA-Z-_.*]+)$' to uri '' xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f21ba0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/ -> xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f21ba0/initial] (3) [perdir /var/www/html/] applying pattern '^([0-9a-zA-Z-]+)$' to uri '' xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f21ba0/initial] (1) [perdir /var/www/html/] pass through /var/www/html/ xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f2cf10/subreq] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/index.php -> index.php xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f2cf10/subreq] (3) [perdir /var/www/html/] applying pattern '.*\.(png|swf|flv|mp3|mp4|jpe?g|js)$' to uri 'index.php' xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f2cf10/subreq] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/index.php -> index.php xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f2cf10/subreq] (3) [perdir /var/www/html/] applying pattern '^([a-z]+)/([0-9a-zA-Z-_.*]+)$' to uri 'index.php' xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f2cf10/subreq] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/index.php -> index.php xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f2cf10/subreq] (3) [perdir /var/www/html/] applying pattern '^([0-9a-zA-Z-]+)$' to uri 'index.php' xx.x.xxx.155 - - [02/Jun/2011:12:20:36 +0200] [www.xxx.com/sid#9d154a8][rid#9f2cf10/subreq] (1) [perdir /var/www/html/] pass through /var/www/html/index.php
Merci d'avance!
Partager