Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-15 03:33:18

april19
Member
From: Sydney, Australia
Registered: 2006-03-15
Posts: 27
Website

joomla migration - Use htaccess to redirect outdated url

hullo,

does anybody out there know how to filter a text string in a url using htaccess?

i migrated a site from joomla to textpattern. old links were indexed by google and now show incorrect page details and still work due to the ID variable being passed.

ive tried as many options as i could find on the web but to no avail.

basically i want to force a redirect if the text “option=com_content” is found in the url..

..any suggestions??

Offline

#2 2006-03-15 05:52:30

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: joomla migration - Use htaccess to redirect outdated url

You could use rewrite rules and a regexp to apply only to that. I know it’s feasible, but I can’t help out for the specifics. Apache’s manual don’t get along with me.

Offline

#3 2006-03-15 17:17:55

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: joomla migration - Use htaccess to redirect outdated url

Offline

#4 2006-03-20 05:51:30

april19
Member
From: Sydney, Australia
Registered: 2006-03-15
Posts: 27
Website

Re: joomla migration - Use htaccess to redirect outdated url

Jeremie we have something in common I do believe.

Els, thanks for the directions. Can you please explain this feeling in my stomach and the words “You are now entering the twilight zone” I’m hearing?

Regular expressions. YUCK!

Offline

#5 2006-03-20 06:00:37

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: joomla migration - Use htaccess to redirect outdated url

Welcome to my world. We have jackets pour the club.

That’s several years I tried to understand Apache manuals, I even bought some books about it. Still, I don’t get it most of the time.

Offline

#6 2006-03-20 14:04:02

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: joomla migration - Use htaccess to redirect outdated url

april19 wrote:

Els, thanks for the directions. Can you please explain this feeling in my stomach and the words “You are now entering the twilight zone” I’m hearing?

Explain, no; understand, yes ;) By providing these links I didn’t mean to say it was easy. I once managed to get something together with regular expressions, in gbp_faux_static. But I’m still wrestling with it for a redirect rule in my .htaccess… no luck so far :(

You might want to have a look at this plugin, though you’ll still be needing the regexp.

Offline

#7 2006-04-10 00:46:21

april19
Member
From: Sydney, Australia
Registered: 2006-03-15
Posts: 27
Website

Re: joomla migration - Use htaccess to redirect outdated url

Thankfully the outdated url referred to an actual file, being index.php. The best I could manage was to edit txp files to use default.php instead of index.php so all referrers using the outdated search engine results could be redirected to where I wanted.

Htaccess code used:

RewriteRule ^index.php$ 404.php [nc]

If anyone happens to get funky with htaccess and regular expressions to redirect a url containing specific text, post it here!

Offline

Board footer

Powered by FluxBB