user1532043
user1532043

Reputation: 899

How to redirect one url to another using .htacces?

I have an url like www.example.com/xyz I want to redirect it to www.example.com/abc

xyz and abc can be a long string, what .htaccess rule I should use?

Upvotes: 0

Views: 62

Answers (1)

Creatier
Creatier

Reputation: 9

I am assuming your content was moved permanently? :) In that case it is best to use a permanent (301) redirect rule in your .htaccess file

Redirect permanent /xyz http://www.domain.com/abc

or

Redirect 301 /xyz http://www.domain.com/abc

If this does not solve your problem, please specify the nature of your redirect. Happy to help!

Upvotes: 1

Related Questions