0
我有一個網站與論壇,我正在嘗試清理重複的內容問題。重複內容 - 301重定向部分Joomla網站使用htaccess
我想要做的是301將任何URL與mywebsite.com/recent-topics/category-title/post-title.html重定向到mywebsite.com/forum/category-title/post-title.html。
這是一個Joomla網站和一個htaccess文件已被使用。我已經加入這個字符串到htaccess文件的結束,但它不工作:
RewriteRule ^/recent-topics/(.*) /forum [R=301,L]
完全htaccess文件:
RewriteEngine On
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just/for root).
##
#RewriteBase/
## Begin - Joomla! core SEF Section.
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/component/) [OR]
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
## End - Joomla! core SEF Section.
RewriteRule ^/recent-topics/(.*) /forum [R=301,L]
誰能提供任何意見,至於是什麼,我做錯了什麼?