.htaccess Redirect 301 virker, men der tilføjes mærkelig endelse...
Jeg har et phpBB2 forum hvor jeg gerne vil omdøbe navne på fora og samtidig sikre at der ikke findes to URLs som peger på samme indhold.Kan du gennemskue hvad der skal til for at fx. "?f=17" ikke tilfjøes en redirectet URL?
TAK ... ;-)
Eksempel:
1) http://www.emailsignature.eu/phpBB2/partners-only-f17.html
... skal redirectes til...
2) http://www.emailsignature.eu/phpBB2/office-add-on-partners-only-f17.html
.htaccess:
Redirect 301 /phpBB2/partners-only-f17.html http://www.emailsignature.eu/phpBB2/office-add-on-partners-only-f17.html
Resulterer i (LÆG MÆRKE TIL ENDELSEN):
http://www.emailsignature.eu/phpBB2/office-add-on-partners-only-f17.html?f=17
Jeg regner med at problemet skal findes RewriteRules, men jeg har ingen anelse hvordan det løses.
Her er hele min .htaccess:
------------ htaccess -------------------------
<Files config.php>
Deny from all
</Files>
#DirectoryIndex index.php index.html index.htm
Redirect 301 /index.html http://www.emailsignature.eu/phpBB2/index.php
RewriteEngine On
RewriteRule ^phpBB2/msi-package-t569\.html$ /phpBB2/msi-package-t571.html
# SEO URL [mgutt]
RewriteRule !\.html$ - [L]
RewriteRule ^phpBB2/[a-z0-9-]+-([pt])([0-9]+)\.html$ /phpBB2/viewtopic.php?$1=$2 [L]
RewriteRule ^phpBB2/[a-z0-9-]+-f([0-9]+)\.html$ /phpBB2/viewforum.php?f=$1 [L]
RewriteRule ^phpBB2/[a-z0-9-]+-c([0-9]+)\.html$ /phpBB2/index.php?c=$1 [L]
RewriteRule ^phpBB2/[a-z0-9-]+-u([0-9]+)\.html$ /phpBB2/profile.php?mode=viewprofile&u=$1 [L]
RewriteRule ^phpBB2/([a-zA-Z0-9_]+),([^/,]+),([^/,]*)([^/]*\.html)$ phpBB2/$1$4?$2=$3 [QSA,N]
RewriteRule ^phpBB2/[a-z0-9-]+-([pt])([0-9]+),([^/,]+),([^/,]*)([^/]*\.html)$ phpBB2/viewtopic$5?$1=$2&$3=$4 [QSA,N]
RewriteRule ^phpBB2/[a-z0-9-]+-f([0-9]+),([^/,]+),([^/,]*)([^/]*\.html)$ phpBB2/viewforum$4?f=$1&$2=$3 [QSA,N]
RewriteRule ^phpBB2/([a-zA-Z0-9_]+)\.html$ /phpBB2/$1.php [L]
#Forum names changed and to avoid duplicate content
Redirect 301 /phpBB2/partners-only-f17.html http://www.emailsignature.eu/phpBB2/office-add-on-partners-only-f17.html
------------- htaccess slut ---------------