I am using codeignator and I have to redirect URL. I have two URL which are as follows
https://example.com/contact-us/
https://example.com/about-us/who-we-are/
I don't have any contact
and about-us/who-we-are/
controller name or view in my codeignator project.
Let's talk about exist URL
I am removing the index.php and controller name from the URL.
So my old URL is
https://example.com/index.php/Menu_control/aboutus
Now new URL is
https://example.com/aboutus
//$route['(:any)'] = 'Menu_control/$1';//remove the controller name
Now when user enter the URL https://example.com/contact-us/
then it should be redirect on https://example.com/aboutus/
Same as on my second URL https://example.com/about-us/who-we-are/
to redirect on https://example.com/services/
I tried some code in .htaccess but it's not working for me.
Redirect 301 "https://example.com/contact/" "https://example.com/aboutus/"
Would you help me out in this issue?