.htaccess 301 Redirect... can someone check my work? Doesn't seem to be working

Permalink
I just built a new website for a client. His previous site was a disaster in Joomla and the design and URLs were awful. The website is currently propagating, so that could be the obvious reason for the wonky behavior for some of the links I'm trying to redirect, but I just want to make sure I did this right so I can test after propagation. I've attached my stab at an .htaccess file with 301 Redirects. The .htaccess file on the server now is clean. The previous website had all sorts of junky URLs as you will see. The new website that is propagating has Pretty URLs enabled. Did I put the 301 Redirects in the right place and is my formatting correct?

http://www.azstorage.com

It isn't showing up on Cox, but does on Verizon, so I figure another couple of hours before it will have finished propagating. If you access the URL above and see a website with a BLUE background... that is NOT the C5 site I just launched! :)

1 Attachment

barkingtuna
View Replies: View Best Answer
mesuva replied on at Permalink Best Answer Reply
mesuva
I'm not a big expert on this, but looking at your htaccess file I'm seeing a combination of Modrewrite (for the normal pretty url stuff) and Redirect 301 calls.

I recall reading something about this that it's not good to use both together, often they won't work in conjunction.

We've had a lot of success with this tool:
https://websiteadvantage.com.au/HtAccess-301-Redirect-Generator...

It allows you to paste in a list of old->new page lists and it generates Modrewrite specific redirect rules that you can just add in. Just make sure you take note of the instructions.
barkingtuna replied on at Permalink Reply 1 Attachment
barkingtuna
NICE! Thanks for the help on that... Does this look better to you? Is this going to slow the site load time you think?
mesuva replied on at Permalink Reply
mesuva
A couple of things:

- All the rules you've added need to be after the RewriteEngine On line, see the instruction above what is generated.

- All the rules with phpMyAdmin= seem quite unusual for publicly available URLs. I'd suggest that the random characters after it would be uniquely generated, so it might be fruitless to include them.

Ultimately you have to just put something in place and confirm that the redirects are working as expected. Manually put in the old url and you then check you end up at the right spot.
barkingtuna replied on at Permalink Reply
barkingtuna
Understood... the old website was a complete mess and was created in Joomla. I'm thinking that a "catch-all" is the best way to proceed. The previous DA and PA was abysmal and the individual self storage facility Maps pages all linked to the home page, not the facility pages within the site. So truth be told, a fresh start forwarding everything from the previous site to the new home page and then individually claiming the Google Maps pages and linking them to their respective facility pages within the new site can only help in the long run!

By the way... has azstorage.com propagated yet where you are? Certain ISPs have still not updated yet and are displaying the old website which is blue.
mesuva replied on at Permalink Reply
mesuva
I'm seeing a red and black site, so yep!

https://www.whatsmydns.net/#A/azstorage.com...
barkingtuna replied on at Permalink Reply
barkingtuna
Thanks so much for the help! As for the propagation question, CenturyLink/Qwest has still not updated... everyone else has.