philbowell
philbowell
Switched the domain of my blog this morning from philbowell.com to philbowell.blog. Think I’ve managed to transfer everything all ok, and got the redirect working fine. Wondering if there’s a way to only redirect pages beyond the home page. I’d quite like to make the .com a bit of an in... philbowell.blog
|
Embed
smokey
smokey

@philbowell The internet says yes; I have no idea which particular variation is “the best”, but I’m sure one of the .htaccess gurus here can assist if you run into trouble :-)

|
Embed
In reply to
oyam
oyam

@philbowell You sure can, but it partially depends on what's allowed on the server itself. Try something like: RedirectMatch ^/([0-9]{4}/.*) [philbowell.blog/$1](https://philbowell.blog/$1)

|
Embed
oyam
oyam

@oyam @philbowell Well, that got screwed up by M.b. Try this: pastebin.com/tgbgD5vB @manton Is code blocks getting processed a bug or inteded?

|
Embed
oyam
oyam

@philbowell Just a bit of explanation: That should redirect anything with 4 digits (eg: /2018/..., just going off how your blog URLs work) to your .blog url, assuming the URL stays the same. Using 301, as the file has moved permanently to the new blog address (search engines/crawlers will remember that, rather than keep trying your .com address).

|
Embed
manton
manton

@oyam Bug. It shouldn't try to auto-link URLs inside a code block.

|
Embed
philbowell
philbowell

@smokey ha, yeh I hadn’t actually done that yet. Just happy to get things transferred over.

|
Embed
philbowell
philbowell

@oyam thanks, I’ll sit down and give it a try 👍🏻

|
Embed