2014-04-29 2 views
1

서버에 업로드 한 .htaccess 파일이 있습니다. 그것은 작동하지만 이전에는 오류가있는 줄을 추가 했었습니다. 내가 만든301 리디렉션 구성 생성 중 오류가 발생했습니다.

[Tue Apr 29 12:18:58 2014] [10600395] [core:alert] [client 74.64.0.36:62143] /var/chroot/home/content/95/10600395/html/superior/.htaccess: Invalid command '[L,R=301,NC]', perhaps misspelled or defined by a module not included in the server configuration, referer http://superiormaintenanceservices.com/wp-admin/tools.php?page=redirection.php 

유일한 변화는이 라인을 추가했다 :

RewriteRule ^page2\.html$ http://superiormaintenanceservices.com/superior-maintenance-services-llc/ [L,R=301,NC] 
RewriteRule ^page3\.html$ http://superiormaintenanceservices.com/services/ [L,R=301,NC] 
RewriteRule ^page4\.html$ http://superiormaintenanceservices.com/contact-superior-maintenance-services-llc/ [L,R=301,NC] 
RewriteRule ^page6\.html$ http://superiormaintenanceservices.com/commercial-floor-cleaning/ [L,R=301,NC] 
RewriteRule ^page7\.html$ http://superiormaintenanceservices.com/commercial-office-cleaning-michigan/ [L,R=301,NC] 
RewriteRule ^page8\.html$ http://superiormaintenanceservices.com/commercial-power-washing-michigan/ [L,R=301,NC] 
RewriteRule ^page9\.html$ http://superiormaintenanceservices.com/commercial-carpet-cleaning-michigan/ [L,R=301,NC] 

을 그리고 여기에 오류가 내가 얻을 수있다 :

로그 파일 오류입니다

Internal Server Error 

The server encountered an internal error or misconfiguration and was unable to complete your request. 

전체 .htaccess 파일은 다음과 같습니다.

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/

RewriteRule ^page2\.html$ http://superiormaintenanceservices.com/superior-maintenance-services-llc/ [L,R=301,NC]  
RewriteRule ^page3\.html$ http://superiormaintenanceservices.com/services/ [L,R=301,NC] 
RewriteRule ^page4\.html$ http://superiormaintenanceservices.com/contact-superior-maintenance-services-llc/ [L,R=301,NC]  
RewriteRule ^page5\.html$ http://superiormaintenanceservices.com/commercial-cleaners-michigan/ 
    [L,R=301,NC] 
RewriteRule ^page6\.html$ http://superiormaintenanceservices.com/commercial-floor-cleaning/ [L,R=301,NC]  
RewriteRule ^page7\.html$ http://superiormaintenanceservices.com/commercial-office-cleaning-michigan/ [L,R=301,NC] 
RewriteRule ^page8\.html$ http://superiormaintenanceservices.com/commercial-power-washing-michigan/ [L,R=301,NC]  
RewriteRule ^page9\.html$ http://superiormaintenanceservices.com/commercial-carpet-cleaning-michigan/ [L,R=301,NC] 

RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 


</IfModule> 

# END WordPress 

# BEGIN wtwp_cache 
<IfModule mod_mime.c> 

    # Text 
    AddType text/css .css 
    AddType application/x-javascript .js 
    AddType text/html .html .htm 
    AddType text/richtext .rtf .rtx 
    AddType text/plain .txt 
    AddType text/xml .xml 

    # Image 
    AddType image/gif .gif 
    AddType image/x-icon .ico 
    AddType image/jpeg .jpg .jpeg .jpe 
    AddType image/png .png 
    AddType image/svg+xml .svg .svgz 

    # Video 
    AddType video/asf .asf .asx .wax .wmv .wmx 
    AddType video/avi .avi 
    AddType video/quicktime .mov .qt 
    AddType video/mp4 .mp4 .m4v 
    AddType video/mpeg .mpeg .mpg .mpe 

    # PDF 
    AddType application/pdf .pdf 

    # Flash 
    AddType application/x-shockwave-flash .swf 

    # Font 
    AddType application/x-font-ttf .ttf .ttc 
    AddType application/vnd.ms-fontobject .eot 
    AddType application/x-font-otf .otf 

    # Audio 
    AddType audio/mpeg .mp3 .m4a 
    AddType audio/ogg .ogg 
    AddType audio/wav .wav 
    AddType audio/wma .wma 

    # Zip/Tar 
    AddType application/x-tar .tar 
    AddType application/x-gzip .gz .gzip 
    AddType application/zip .zip 
</IfModule> 

<IfModule mod_expires.c> 
    ExpiresActive On 

    # Text 
    ExpiresByType text/css A31536000 
    ExpiresByType application/x-javascript A31536000 
    ExpiresByType text/html A3600 
    ExpiresByType text/richtext A3600 
    ExpiresByType text/plain A3600 
    ExpiresByType text/xml A3600 

    # Image 
    ExpiresByType image/gif A31536000 
    ExpiresByType image/x-icon A31536000 
    ExpiresByType image/jpeg A31536000 
    ExpiresByType image/png A31536000 
    ExpiresByType image/svg+xml A31536000 

    # Video 
    ExpiresByType video/asf A31536000 
    ExpiresByType video/avi A31536000 
    ExpiresByType video/quicktime A31536000 
    ExpiresByType video/mp4 A31536000 
    ExpiresByType video/mpeg A31536000 

    # PDF 
    ExpiresByType application/pdf A31536000 

    # Flash 
    ExpiresByType application/x-shockwave-flash A31536000 

    # Font 
    ExpiresByType application/x-font-ttf A31536000 
    ExpiresByType application/vnd.ms-fontobject A31536000 
    ExpiresByType application/x-font-otf A31536000 

    # Audio 
    ExpiresByType audio/mpeg A31536000 
    ExpiresByType audio/ogg A31536000 
    ExpiresByType audio/wav A31536000 
    ExpiresByType audio/wma A31536000 

    # Zip/Tar 
    ExpiresByType application/x-tar A31536000 
    ExpiresByType application/x-gzip A31536000 
    ExpiresByType application/zip A31536000 
</IfModule> 
<FilesMatch "\.(?i:css|js|htm|html|rtf|rtx|txt|xml|gif|ico|jpg|jpeg|jpe|png|svg|svgz|asf|asx|wax|wmv|wmx|avi|mov|qt|mp4|m4v|mpeg|mpg|mpe|pdf|swf|ttf|ttc|eot|otf|mp3|m4a|ogg|wav|wma|tar|gz|gzip|zip)$"> 
    <IfModule mod_headers.c> 
     Header set Pragma "public" 
     Header append Cache-Control "public, must-revalidate, proxy-revalidate" 
     Header unset ETag 
    </IfModule> 
</FilesMatch> 
<FilesMatch "\.(?i:css|js|gif|ico|jpg|jpeg|jpe|png|pdf|swf|ttf|ttc|eot|otf)$"> 
    <IfModule mod_headers.c> 
     Header unset Set-Cookie 
    </IfModule> 
</FilesMatch> 
# END wtwp_cache 

# BEGIN wtwp_security 
<IfModule mod_rewrite.c> 
    RewriteEngine On 
    RewriteBase/
    RewriteRule ^wp-admin/includes/ - [F,L] 
    RewriteRule !^wp-includes/ - [S=3] 
    RewriteRule ^wp-includes/[^/]+\.php$ - [F,L] 
    RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L] 
    RewriteRule ^wp-includes/theme-compat/ - [F,L] 
</IfModule> 
<Files "wp-config.php"> 
    Order allow,deny 
    Deny from all 
</Files> 
Options -Indexes 
# END wtwp_security 
+0

당신은 오류가 무엇인지 확인하기 위해 아파치하는 error.log를 확인 할 수 있나요? – anubhava

+0

@anubhava 방금 로그 파일 오류로 원래 질문을 업데이트했습니다. 도와 주려고 당신보다 : – Genadinik

답변

1

잘못된 구문 인 새 행에 [L,R=301,NC]이 있습니다. 한 줄에 넣어 :

RewriteRule ^page5\.html$ http://superiormaintenanceservices.com/commercial-cleaners-michigan/ [L,R=301,NC] 
+0

감사합니다. 나는 거기에 새로운 라인이 있음을 알았다. 나는 그것을 조정했다. 그러나 나는 아직도 오류를 얻는다. 나는 또한 선의 시작 직후에 나타나는 301을 꺼내는 것을 보았습니다. 그건 내 실수 였어? – Genadinik

+0

예 줄 바꿈'[L, R = 301, NC]'을 줄 바꿈에서 제거해야했습니다. 아직도 500을 얻는다면 아파치 error.log를 다시 확인하십시오. – anubhava

+0

그래도 문제가 해결 된 후에도 여전히 같은 오류가 발생합니다. 어떤 생각이 아직도 잘못 될 수 있습니까? – Genadinik

관련 문제