If the old URI (as specified in page links, address bar etc) has a .html extension (eg http://www.cife.org.uk/retakes.html), a redirect works fine, provided that I put a short file called retakes.html in the site's root directory.
redirect 301 /retakes.html http://www.cife.org.uk/FAQs-about-A-level-retakes works just fine.
My problem is that what I really want to redirect are requests for site files without an extension. For example, Google give a link to this page as 'www.cife.org.uk/retakes/. Putting redirect 301 /retakes/ http://www.cife.org.uk/FAQs-about-A-level-retakes into my .htaccess file produces a URI of http://www.cife.org.uk/FAQs-about-A-lev ... e=retakes/
I can see what's happening (or what I think's happening): the rewrite code in the .htaccess file which CMSMS sets up is looking at the input address of '/retakes/', deciding it isn't a directory or a file and rewriting my output URI by adding ?page=retakes to it.
But, I'm not expert enough to see how I can solve this problem!
The rewrite code in my .htaccess file (which comes at the end, after all 301 redirect lines) reads
Code: Select all
#Options -Indexes
#ServerSignature Off
#Options +FollowSymLinks
#
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms/
RewriteBase /
#
# added by ISVirtual to sort out standard domain canonicalisation issue
# alex.poole@isvirtual.co.uk
# 28th May 2010
#
RewriteCond %{HTTP_HOST} ^cife.org.uk [NC]
RewriteRule ^(.*)$ http://www.cife.org.uk/$1 [R=301,L]
#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>