내가 사용자가 article.php하고 페이지를 보여 앞으로htaccess로 규칙은 때때로 항상은 아니지만
www.mydomain.com/en/this-is-an-article.html
에 규칙을 내 htaccess로
RewriteRule ^(el|en)/(.*).html/?$ article.php?lang=$1&url=$2 [L,NC,QSA]
에 다음과 같은 규칙을 이동 한 경우 실패합니다.
문제는 때때로 규칙이 실패하고 대신하는
www.mydomain.com/en/this-is-an-article.html
의 이동
에www.mydomain.com/article.php
로 이동 페이지가 통과 매개 변수를 전송하지 않기 때문에 렌더링하지 실행할 수없는 것이있다 그것을 처리하십시오
페이지를 보려면 다른 클릭을하면 예상대로 페이지가 렌더링됩니다.
처음으로 나는 그런 것을 본다.
전체 htaccess로 코드
RewriteEngine on
Options -Indexes
AddDefaultCharset UTF-8
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
# WEEK
<FilesMatch "\.(pdf|swf|js|css|jpg|png|gif|JPG)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl|ttf|woff)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
#fcp.php
RewriteRule ^(el|en)/fcp.php?$ fcp.php?lang=$1 [L,NC,QSA]
#tuner.php
RewriteRule ^(el|en)/index-b/(.*).html/?$ index-b.php?lang=$1&url=$2 [L,NC,QSA]
RewriteRule ^(el|en)/catalog-b/(.*).html/?$ catalog-b.php?lang=$1&url=$2 [L,NC,QSA]
#product.php
RewriteRule ^(el|en)/product/(.*).html/?$ product.php?lang=$1&url=$2 [L,NC,QSA]
#article.php
RewriteRule ^(el|en)/(.*).html/?$ article.php?lang=$1&url=$2 [L,NC,QSA]
#controller.php
RewriteRule ^(el|en)/(.*)/p/([^.]+)?$ controller.php?lang=$1&url=$2&p=$3 [L,NC,QSA]
RewriteRule ^(el|en)/(.*)/?$ controller.php?lang=$1&url=$2 [L,NC,QSA]
#index.php
RewriteRule ^(el|en)?$ index.php?lang=$1 [L,NC,QSA]
사람이
이 유일한 규칙입니다 또는 당신은 또한 더 규칙을 가지고? – anubhava
아니지만 .html을 가진 유일한 사람은 다른 규칙과 혼동하지 않도록합니다. – ntan
ok .htaccess 전체를 붙여 넣을 수 있습니까? – anubhava