古いCMSを置き換えるためにSocialEngineをインストールしました。問題は、多くの古いURLが検索エンジンに存在することです。現在のウェブサイトの対応するURLにリダイレクトしたい(この時点ではホームページにリダイレクトするだけなので)。SocialEngine - 301古いサイトページのリダイレクト.htaccess
古いCMSのすべてのコンテンツがSEにインポートされたため、各古いページには同等の機能があります。たとえば : 古いアドレス:/index.php?mod=news & AC = commentaires & ID = 367 新住所:
:/記事/ 367私のように私の.htaccess何かに追加しようとしました
redirectmatch 301 index.php?mod=news&ac=commentaires&id=([0-9]+) http://www.nailissima.fr/articles/$1
しかし、動作しません。古いアドレスを入力すると、対応する記事ではなくホームページにリダイレクトされます。
あなたはそれを解決するのを手伝ってもらえますか?ここで
は私の.htaccessです:
# $Id: .htaccess 7539 2010-10-04 04:41:38Z john $
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
# Get rid of index.php
RewriteCond %{REQUEST_URI} /index\.php
RewriteRule (.*) index.php?rewrite=2 [L,QSA]
# Rewrite all directory-looking urls
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*) index.php?rewrite=1 [L,QSA]
# Try to route missing files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} public\/ [OR]
RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
RewriteRule . - [L]
# If the file doesn't exist, rewrite to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]
</IfModule>
# sends requests /index.php/path/to/module/ to "index.php"
# AcceptPathInfo On
# @todo This may not be effective in some cases
FileETag Size
は、事前にありがとうございます!おそらく
敬具
編集したhtaccessをルールを追加した場所に投稿できますか? – Salman