Forum

Redirect old site url to new wordpress site

Fred
18 October 2016, 23:54
Hi Hugo,
We have ready to me our old site to our new wordpress site..
In order to keep google and our ranking, we wrote the following rules:
UrlToolkit {
ToolkitID = redirect_old_urls
Match ^/testing.shtml$ Redirect /testing
Match ^/payments.shtml$ Redirect /payments
Match ^/enquiry.php Redirect /contact
Match ^/packs.shtml Redirect Redirect /category/sale
Match ^/privacy.shtml Redirect Redirect /privacy
Match ^/ground-protection-mats.shtml Redirect /product/durapark-tile-black
Match ^/garage-flooring.shtml Redirect /category/garage-flooring
Match ^/cookies.shtml Redirect /cookies
Match ^/faq.shtml$ Redirect http://uptime.trinitech.uk/
Match ^/help.shtml Redirect /help
Match ^/ground-stabilisation-mats.shtml Redirect /product/durapark-tile-black
Match ^/accessories.shtml Redirect /category/accessories
Match ^/disc-plate.shtml Redirect /product/discplate-tile-black
Match ^/ground-shield.shtml Redirect /product/durapark-tile-black
}

The code above doesn't work for some reason. When I type http://mydomain.com/faq.shtml I am not redirected to http://mydomain.com/fag

Could you please tell me where I went wrong?

Thank you
Fred
Hugo Leisink
19 October 2016, 08:13
First, there are some errors in the toolkit rule. Line 6 and 7 contain a double 'Redirect'. The line with /faq.shtml doesn't redirect to /faq, but to a complete new URL. Change that line to
Match ^/faq.shtml$ Redirect /faq
Fred
19 October 2016, 11:13
Hugo,

Thank you for the fast reply.
Do I need the $ at the end of all the entries?
Do you think the double 'Redirect' wa stopping it from working?
Does Hiawatha do any check on the toolkit when restarting?

Fred
Fred
19 October 2016, 12:51
Hi Hugo,

I have made the changes but the rules are still not working.
I have send you an email with domain URL and config file

Hope you can help further

Thank you
Fred
19 October 2016, 17:13
Hi Hugo,

I managed to sort it with yoast seo but I still like to know if redirection as mentioned above is possible with hiawath/wordpress

Thank you
Hugo Leisink
20 October 2016, 11:43
Can you tell me what you want? Hiawatha's UrlToolkit works as intended.
Fred
21 October 2016, 12:21
Hi Hugo
I want to redirect url that are indexed in google to be redirected to the new location.
For for example, if I type the name of my website in google, it return my site at the top of google a with the most popular url..
One of them is www.mydomain.co.uk/garage-flooring.shtml .
On the new website this page exist but it is located at mydomain.co.uk/category/garage-flooring. Wordpress don't display extension.
What I need is a 301 permanent redirection from www.mydomain.co.uk/garage-flooring.shtml to mydomain.co.uk/category/garage-flooring

Hope this is clearer

Fred
Hugo Leisink
21 October 2016, 13:21
For that, your UrlToolkit rule looks ok. Can you tell me the url of your website? I want to see for myself what goes wrong.
This topic has been closed.