2017-05-15 15 views
1

これが今の私の.htaccessファイルです:htaccessの410エラー*

Options +FollowSymLinks -MultiViews 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/

RewriteCond %{REQUEST_URI} gions [NC] 
RewriteRule^- [R=410,NC,L,PT] 

RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ 
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ 
RewriteRule ^promotii.*$ http://%{HTTP_HOST}/rochii-mireasa/promotii/ [R=301,L] 
RewriteRule ^colectia.*$ http://%{HTTP_HOST}/rochii-de-mireasa/ [R=301,L] 
RewriteRule ^material.*$ http://%{HTTP_HOST}/rochii-de-mireasa/ [R=301,L] 
RewriteRule ^stil.*$ http://%{HTTP_HOST}/rochii-de-mireasa/ [R=301,L] 
RewriteRule ^decolteu.*$ http://%{HTTP_HOST}/rochii-de-mireasa/ [R=301,L] 

RewriteCond %{REQUEST_URI} ^(.*)gions$ 
RewriteRule^- [R=410,L] 

RewriteCond %{HTTP_HOST} !^www\. 
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ 
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ 
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.+)$ index.php [L] 
</IfModule> 
DirectoryIndex index.php index.html index.htm 

私は次のシナリオをしたい:gionsで終わるすべてのURLが410エラーページを持っている必要があります。たとえそれが最初のルールであっても、私が何をしても今は機能しません。最後のルールのみがindex.phpにリダイレクトされます。

これを変更して、すべてのURLの末尾に410ページがあります。gions

答えて

0

あなたはRedirectMatchディレクティブでこれを行うことができます。

RedirectMatch 410 ^.*gions$ 
関連する問題