2014-09-23 2 views
0

개구리 CMS에 문제가 있습니다.이 CMS를 처음 사용하면이 기능을 사용하는 클라이언트입니다.개구리 CMS htaccess 진단

시나리오 : 전체 사이트를 파괴하는 "Redirector"라는 플러그인을 사용하여 1 개의 리디렉션을 수정했습니다!

운 좋게도, 몇 달 전에 htaccess가 작동한다는 것을 알았지 만 리디렉션이 작동하지 않고 리디렉션이 작동하지 않고 사이트가 작동하지만 리디렉션이 아닌 사이트의 주요 URL 재 작성이 OK 인 것 같습니다. ,하지만 내가 필요로하는 301 리디렉션은 작동하지 않습니다.

왜 이런 일이 일어나고 있는지, 왜이 리다이렉션이 제대로 작동하지 않는지, 충돌하지는 않지만, 아무 것도하지 않는다는 것을 알아낼 수 없습니다! 이것에 대해 조언 할 수 있습니까? 나는 url rewritting과 htaccess에 대해 더 많은 것을 기대하고있다.

전체 사이트를 파괴했기 때문에 플러그인을 사용하여 리디렉션을 생성 할 수 없습니다. 이 CMS에서 URL 재 작성을 "재설정"하는 방법이 있다면 좋을 것입니다. 그러나 사이트 개발자가 협력 양식을 가지고 있지는 않습니다 ...

무엇이 잘못 되었습니까? 모두

RewriteRule ^site/services/immigration/ /services/immigration.html [L,R=301] 

일하지 마십시오!

RewriteRule ^site/services/ /services.html [L,R=301] 

이 말하는 "/site/services/시작이 /services.html로 리디렉션됩니다 아무것도": 당신이 당신의 다른 서비스의 모든 전에 규칙이 규칙 리디렉션이 있기 때문에

### CMS-Generated Update August 1, 2013, 1:45 pm ### 

# 
# Setting Frog requirements 
# 
AddType text/x-component .htc 
AddType video/ogg .ogm 
AddType video/ogg .ogv 
AddType video/ogg .ogg 
AddType video/webm .webm 
AddType video/mp4 .mp4 
AddType video/x-m4v .m4v 
AddType audio/webm .weba 
AddDefaultCharset UTF-8 
Options -Indexes -MultiViews +FollowSymLinks 
DirectoryIndex index.html index.php 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
RewriteCond %{HTTP_HOST} !.local$ [NC] 
RewriteCond %{HTTP_HOST} !.local$ [NC] 
RewriteCond %{HTTP_HOST} !^www\. [NC] 
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] 
RewriteRule ^install/index.html$ install/index.php?rewrite=1 [L,QSA] 
RewriteRule ^install/index.php$ install/index.php?rewrite=1 [L,QSA] 
RewriteRule ^install/$ install/index.php?rewrite=1 [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^admin(.*)$ admin/index.php?$1 [L,QSA] 
RewriteCond %{DOCUMENT_ROOT}/cache/index.html -f 
RewriteRule ^$ /cache/index.html [L,QSA] 
RewriteCond %{REQUEST_METHOD} ^GET$ 
RewriteCond %{DOCUMENT_ROOT}/cache/%{REQUEST_URI} -f 
RewriteRule ^(.*)$ /cache/$1 [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^download/(.*)$ /downloads.php?THISPAGE=download.html&media=pdf&filename=$1 [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^private/(.*)$ /private.html?THISPAGE=private.html&userfile=$1 [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^mobile/search/(.*)$ mobile.html?THISPAGE=search.html&media=mobile&search=$1 [L,QSA] 
#RewriteCond %{REQUEST_FILENAME} !-f 
#RewriteCond %{REQUEST_FILENAME} !-d 
#RewriteCond %{REQUEST_FILENAME} !-l 
#RewriteRule ^mobile/(.*)/process.html$ mobile.html?THISPAGE=$1&media=mobile&return=process [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^mobile/(.*)/success.html$ mobile.html?THISPAGE=$1&media=mobile&return=success [L,QSA] 
#RewriteCond %{REQUEST_FILENAME} !-f 
#RewriteCond %{REQUEST_FILENAME} !-d 
#RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^standard/search/(.*)$ standard.html?THISPAGE=search.html&media=standard&search=$1 [L,QSA] 
#RewriteCond %{REQUEST_FILENAME} !-f 
#RewriteCond %{REQUEST_FILENAME} !-d 
#RewriteCond %{REQUEST_FILENAME} !-l 
#RewriteRule ^standard/(.*)/process.html$ standard.html?THISPAGE=$1&media=standard&return=process [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^standard/(.*)/success.html$ standard.html?THISPAGE=$1&media=standard&return=success [L,QSA] 
#RewriteCond %{REQUEST_FILENAME} !-f 
#RewriteCond %{REQUEST_FILENAME} !-d 
#RewriteCond %{REQUEST_FILENAME} !-l 
#RewriteRule ^(.*)/process.html$ contact.html?THISPAGE=$1&return=process [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^(.*)/success.html$ contact.html?THISPAGE=$1&return=success [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^search/(.*)$ index.php?THISPAGE=search.html&search=$1 [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^proposal.html$ index.php?THISPAGE=$1&media=proposal [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^contrast/search/(.*)$ contrast.html?THISPAGE=search.html&search=$1&media=contrast [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^print/search/(.*)$ print.html?THISPAGE=search.html&search=$1&media=print [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^mobile/(.*)$ mobile.html?THISPAGE=$1&media=mobile [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^standard/(.*)$ standard.html?THISPAGE=$1&media=standard [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^print/(.*)$ print.html?THISPAGE=$1&media=print [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^pdf/(.*)$ pdf.html?THISPAGE=$1&media=pdf [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^proposal/(.*)$ proposal.html?THISPAGE=$1&media=proposal [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^flash/(.*)$ flash.html?THISPAGE=$1&media=flash [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^contrast/(.*)$ contrast.html?THISPAGE=$1&media=contrast [L,QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^(.*)$ index.php?THISPAGE=$1 [L,QSA] 
RewriteRule ^/site/aboutus/(.*)$ /$1 [L,R=301] 
RewriteRule ^site/aboutus//[L,R=301] 
RewriteRule ^pages/about_us.htm /about.html [L,R=301] 
RewriteRule ^site/contact/ /contact.html [L,R=301] 
RewriteRule ^site/library/ /resources.html [L,R=301] 
RewriteRule ^site/services/ /services.html [L,R=301] 
RewriteRule ^site/services/alternative_dispute_resolution/ /services/alternative-dispute-resolution.html [L,R=301] 
RewriteRule ^site/services/business_visas/ /services/business-visas.html [L,R=301] 
RewriteRule ^site/services/civil_comm_litigation/ /services/civil-commercial-litigation-copy.html [L,R=301] 
RewriteRule ^site/services/clinical_negligence/ /services/clinical-negligence.html [L,R=301] 
RewriteRule ^site/services/conveyancing/commercial/ /services/commercial-conveyancing.html [L,R=301] 
RewriteRule ^site/services/company_law/ /services/company-law.html [L,R=301] 
RewriteRule ^site/services/criminal_law/ /services/criminal-law.html [L,R=301] 
RewriteRule ^site/services/divorce_matrimonial/ /services/divorce-matrimonial.html [L,R=301] 
RewriteRule ^site/services/employment_law/ /services/employment-law.html [L,R=301] 
RewriteRule ^site/services/human_rights/ /services/human-rights-issues.html [L,R=301] 
RewriteRule ^site/services/immigration/ /services/immigration.html [L,R=301] 
RewriteRule ^site/services/leases_tenancy/ /services/leases-tenancy-agreements.html [L,R=301] 
RewriteRule ^site/services/injury_medical_negligence/ /services/personal-injury-medical-negligence.html [L,R=301] 
RewriteRule ^site/services/pro_bono/ /services/pro-bono.html [L,R=301] 
RewriteRule ^site/services/conveyancing/ /services/residential-conveyancing.html [L,R=301] 
RewriteRule ^site/services/conveyancing/residential/ /services/residential-conveyancing.html [L,R=301] 
RewriteRule ^site/services/wills_trusts_probates/ /services/wills-trusts-probates.html [L,R=301] 
RewriteRule ^site/people/ /team.html [L,R=301] 
</IfModule> 

답변

0

이 있습니다. 이 같은 규칙이 때, : 그 후

RewriteRule ^site/services/company_law/ /services/company-law.html [L,R=301] 

를 두 번째 규칙 따라서 첫 번째 규칙을 일치/site/services/ 시작 , /site/services/company_law 일치하기 때문에, 두 번째 규칙 을 실행되지 얻을 않습니다. 보다 일반적인 규칙이 끝나도록 모든 규칙을 다시 정렬해야합니다. 그냥 넣으십시오.

RewriteRule ^site/services/ /services.html [L,R=301] 

규칙을 맨 아래에 넣으십시오.

+0

도움 주신 덕분에, 이것은 이해하기에 좋았습니다. 어떤 이유로 리디렉션이 작동하지 않습니다. 브라우저에서 열려고하면 404 오류가 발생합니다. – maha2

+0

@glowzar mod_rewrite를 (를) 로딩 하시겠습니까? –