How To: Redirect Google URL to new Website URL (301 Redirect + Wildcard Links)

Discussion for guides including MAMP official & unofficial documentation. User submitted guides can be moved here by moderators.
Post Reply
mampsupportmod
Site Admin
Posts: 156
Joined: Wed Jan 20, 2021 3:06 am

How To: Redirect Google URL to new Website URL (301 Redirect + Wildcard Links)

Post by mampsupportmod »

In your .htaccess file, add the following code for each redirect you want to create per wildcard URL or individual URL.



Redirect old URL to new site URL:

Code: Select all

Redirect 301 /oldgoogleurl https://newwebsite.com/newurl


Redirect wildcard URL to new site URL:

Code: Select all

RedirectMatch 301 ^/oldgoogleurl.*$ https://newwebsite.com/
MAMP Support Forums is an unofficial support forum covering MAMP & MAMP Pro solution stacks.
Post Reply