How to redirect to a specific url in htaccess?

Member

by dedrick , in category: Third Party Scripts , 2 months ago

How to redirect to a specific url in htaccess?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by darrion.kuhn , 2 months ago

@dedrick 

To redirect to a specific URL using .htaccess, you can use the following code:

1
Redirect 301 /old-url http://www.example.com/new-url


Replace /old-url with the old URL you want to redirect from and http://www.example.com/new-url with the new URL you want to redirect to. This code will create a permanent 301 redirect from the old URL to the new URL.