Registrations: Open.
Please register here.

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
User avatar
mampsupportmod
Site Admin
Posts: 71
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/
Post Reply