nezter
nezter

Reputation: 5

Redirect links to correct directory

We have on our site hundreds of links that point to:

/about/about/filename.html

But we need them to go to:

/about/filename.html

Is there a way to point them to the correct directory?

We are running on a Linux server and the site is build with Joomla Version 1.5.10 and there is ARTIO JoomSEF 3.8.2 running on it.

Thanks

Upvotes: 0

Views: 228

Answers (1)

Bendoh
Bendoh

Reputation: 585

Assuming you're using the Apache webserver, you can use mod_rewrite, specifically the RewriteRule directive:

RewriteRule /about/about/(.+)$ /about/$1 [R=301]

Place this rule in your httpd.conf file in the <VirtualHost> context for the site in question, or in a .htaccess file in the site's DocumentRoot.

This rule will create a 301 Permanent redirect for requests to any path under /about/about/ to the same path under /about/. e.g., /about/about/filename.html will redirect to /about/filename.html

Upvotes: 1

Related Questions