Get exclusive CAP network offers from top brands

View CAP Offers

Need help with .htaccess 301 redirections and rewrite rules

You have affiliate marketing questions. CAP has answers!Category: Website Design and DevelopmentNeed help with .htaccess 301 redirections and rewrite rules
Kononen asked 3 years ago
Hi!

Im redirecting my .html site to WordPress and i need some help with the redirections. I need to redirect all my pages separately in my .htaccess file and i have them all ready like this:

redirect 301 /mypage1.html http://www.mysite.com/mypage1/

Im not sure if that is right way, but then i will also need to know which rules to set. Im so confused about this and if someone can help me and solve this problem i will pay for that for sure.

Thanks,

2 Answers
desmondiac answered 3 years ago
This seems to be right if you want to use 301 redirect. But maybe you want simply remove .html extension from the address and then this guide will be more useful for you: php – How to remove file extension from website address? – Stack Overflow

Venomous answered 3 years ago
301 Redirect with mod_rewrite or RedirectMatch

The above link should help you. It’s everything you could/should need.

V