VirtueMart 2 + 3 > Security (https) / Performance / SEO, SEF, URLs

Advice on url structure after site redesign

(1/3) > >>

Morning all,

I wonder if anyone could lend some advice on a dilemma we have on a site redesign which uses a new template and home page set up.

We are using Joomla! 3.10.6, vm 3.8.8.  Yootheme 2.7.16, VMuikit 10.9.

We have moved from a site design which had virtuemart as the home page so our url structure was simple. i.e (for categories) (for products)

In our new site design, to allow us to design our homepage with all info required (i.e using the yootheme builder) we have had to create a menu item to associate the virtuemart category layout to.

This now means all our urls have changed to : (for categories) (for products)

This gives us a problem in that we have about 3,500 already indexed category and product pages that will now 404.

I have been trying to find a solution, but i am wary of using a seo extension to create redirects because of the sheer number and what that would do to the site.

Is anyone able to lend any advice on how we could make these links work without the /MENUSLUG/ part of the new url structure so our already indexed pages would continue to work?

Kind regards


Studio 42:
If you have not to many categories, you can add the redirection directly
for products, you can modify the suffix in the vm config to"detail" and check for "details' to redirect old links correctly

This operation must be prepared before deploy new version (big mistake.. wonder after deploy is wonder for me everytime if I see others work) ach :(

So we put redirect in httacess manually from export old sitemaps to excel. So many hours :)
yes we use sometimes * or $ for group of redirects and we use loading redirects.txt file to httacess.

But after this we fight with canonical links, and then we use Jmap

Many thanks S42 and pinochico. I really appreciate your advice.

Looking at our vm category and product redirects needed, i have identified about 3500 needed in a spreadsheet as suggested.

I wonder is there an issue putting this many rules in the .htaccess file? is that likely to affect site speed and performance? (i could ask our host siteground to put these server side perhaps if this is a more efficient solution)

I understand the ability to modify the suffix in the vm config to "detail", but I am not very experienced in redirect rules, what would the code/rule look like to address this using the example earlier?

Kind regards


first, look in your .htaccess and find this:

--- Code: ---RewriteEngine On
--- End code ---
remove the # in front if needed

Then find this:

--- Code: ---## Begin - Custom redirects
--- End code ---
And add those below just after

for the "detail" you can start with this:

--- Code: ---RewriteRule ^(.*)-details\.html$ /$1.html [R=302,L]
--- End code ---

Then check the results, once all is fine change to:

--- Code: ---RewriteRule ^(.*)-details\.html$ /$1.html [R=301,L]
--- End code ---

(302 tell the bot that this is temporary, 301 that's permanent)

For the "/MENUSLUG/examplecategory.html" if the old link (/examplecategory.html) is not naturally generated by the website, so you're facing an alias, the natural way should be to redirect the old link to the new one.
So as Pinochico said, you must first check if the canonical link is really like "/MENUSLUG/examplecategory.html" before making any choice.

But to redirect the categories in one way or another you can use:

--- Code: ---RewriteRule ^MENUSLUG\/(.*)\.html /$1 [QSA,L,R=301]
--- End code ---
other way

--- Code: ---RewriteRule ^(.*)\.html /MENUSLUG/$1.html [QSA,L,R=301]
--- End code ---

To do some tests you can look at the network dev console of your browser or use this one:


[0] Message Index

[#] Next page

Go to full version