Page is a not externally linkable
You_can_call_me_Al - 12:49 am on Jan 21, 2011 (gmt 0)
Hi,
First time posting here so hopefully i picked the correct forum for this.
Basically I have a Joomla site that I need a 301 redirect for, but try as I might I can't seem to get the correct syntax (or maybe it is the order I have wrong?)
I have an article which is found at
http : // www.mydomainnamehere.com.au/publications
However, some of my 'read more' links within 'articles appearing within modules' the SEF URL is not being correctly generated and appears relative to the current viewed article. (I know this is the real issue I need to solve but in the meantime I want to apply a 301 redirect)
So the incorrect link appears as
http : // www.mydomainnamehere.com.au/component/content/article/..current section name here.../79-publications
As the current section name changes based on where you are in the site I am ending up with loads of different URI's that all go to the same article.
So I simply want to redirect any URI REQUEST that ends in
/79-publications
to
http : // www.mydomainnamehere.com.au/publications
but i have tried many variations and none seem to be having any affect. So, hoping someone here can explain what I am doing wrong
Here is my 'best effort' code:
First I have my canonical rules (i have edited out the real domain so that it doesn't get indexed on this page).
This works fine.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomainnamehere\.com.au$
RewriteRule (.*) http : // www.mydomainnamehere.com.au/$1 [R=301]
Then the bit that Joomla sticks in whi9ch I havent edited. This works well too:
########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
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
Then I tried this, but it didnt have any affect -
RewriteRule ^79-publications http : // www.mydomainnamehere.com.au/publications/ [R=301,L]
So then I tried this with the condition and the wild card, but again, no affect at all...
RewriteCond %{REQUEST_URI} \79-publications$
RewriteRule ^(.*)$ http : // www.mydomainnamehere.com.au/publications/? [R=301,L]
I also tried sticking
RewriteEngine On
in again just before my rule because I thought the ,L in the Joomla rules meant 'last redirect rule'. But again, no affect at all.
Sorry its a long post - just wanted to be clear about what I am trying to do, and what I had already attempted before posting for help..
Thanks in advance to anyone willing to help me out here.
cheers
Al
ps - i have added spaces to http : // in this post so it displays it.