2013-03-06 4 views
0

이 웹 사이트의 경우 www.demoeial.be에서 모든 링크에 대해 URL 다시 쓰기를 사용했습니다. 이 기사에 대한 재 작성 규칙입니다 :URL 다시 쓰기가 작동을 멈췄습니다.

Options +FollowSymlinks 
RewriteEngine on 
RewriteRule ^artikels/([0-9]+)/(.*).dhtml http://www.demoeial.be/articles.php?article_id=$1 [NC] 
RewriteRule ^prints/([0-9]+)/(.*).dhtml http://www.demoeial.be/print.php?action=view&print_id=$1 [NC] 
RewriteRule ^auteur/([0-9]+)/([0-9]+)/(.*).dhtml http://www.demoeial.be/author.php?action=view&author_id=$1&page=$2 [NC] 

RewriteRule ^nieuws/([0-9]+)/$ category.php?cat_id=1&page=$1 
RewriteRule ^dossiers/([0-9]+)/(.*)/([0-9]+)/$ dossiers.php?dossier_id=$1&page=$3 
RewriteRule ^interviews/([0-9]+)/$ category.php?cat_id=4&page=$1 
RewriteRule ^reportages/([0-9]+)/$ category.php?cat_id=5&page=$1 
RewriteRule ^cultuur/([0-9]+)/$ category.php?cat_id=6&page=$1 
RewriteRule ^opinie/([0-9]+)/$ category.php?cat_id=2&page=$1 
RewriteRule ^satire/([0-9]+)/$ category.php?cat_id=7&page=$1 
RewriteRule ^politiek-filosofie/([0-9]+)/$ category.php?cat_id=8&page=$1 
RewriteRule ^literair/([0-9]+)/$ category.php?cat_id=9&page=$1 
RewriteRule ^muziek/([0-9]+)/$ category.php?cat_id=10&page=$1 
RewriteRule ^meewerken/$ content.php?content_id=2 
RewriteRule ^over/$ content.php?content_id=1 
RewriteRule ^zoeken/(.*)/([0-9]+)/$ search.php?search_words=$1&page=$2 

RewriteRule ^print/([0-9]+)/$ print.php?page=$1 


<IfModule mod_deflate.c> 
    AddOutputFilterByType DEFLATE text/css text/javascript application/x-javascript application/javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json 
</IfModule> 

그것은 이전 작업을했지만, 시간이 있기 때문에 브라우저는 분명히 서버 링크로 리디렉션됩니다. 예를 들어 http://www.demoeial.be/artikels/10436/Studentenoverleg-VGC-levert-weinig-op.dhtmlhttp://www.demoeial.be/articles.php?article_id=10436입니다. 그 전에는 그 두 번째 링크를 보여주지 않았고 좋은 모습을 보여주었습니다. 무슨 일이 일어난 건지 모르겠지만, 이전에는 효과가있었습니다. 추측 해봐?

미리 감사드립니다.

+0

을, 리디렉션이 발생 할 이유가 없다. 제 생각에 그것은'.htaccess'의 이전 규칙에 의해 트리거 될 것입니다. – cheesemacfly

+0

@cheesemacfly 문제는 htaccess에 다른 규칙이 없음을 나타냅니다. 나는 어떤 서버 설정이나 무언가가 변경되었다고 생각하기 시작했다. – purplizer

+0

만약 당신의 전체'.htaccess'라면 문제는 다른 곳에서 온다. 아파치와 관련된 설정 파일이 수정 되었습니까? – cheesemacfly

답변

0

내가 일 때 전에 작동했다면 의심 스럽습니다. 대체 URL에 http://으로 시작하는 규칙은 리디렉션을 만듭니다. 이에

RewriteRule ^artikels/([0-9]+)/(.*).dhtml http://www.demoeial.be/articles.php?article_id=$1 [NC] 

:이 규칙 변경 여기에있는 conf의와

RewriteRule ^artikels/([0-9]+)/(.*).dhtml articles.php?article_id=$1 [NC] 
+0

감사합니다. 그런 간단한 해결책. 며칠 동안 솔루션을 검색해 왔습니다! 분명히 내가 다시 작성 URL을 변경해야합니다 길을 따라. – purplizer

+0

글쎄, 이것은 사실이 아닙니다. 규칙이 'http : //'로 시작하고 현재 호스트와 일치하면 리디렉션을 만들지 않습니다. (http://httpd.apache.org/docs/current/mod/mod_rewrite.html) – cheesemacfly

관련 문제