How to give 301 redirect to change old url to new url in PHP CodeIgniter?
-
I want to redirect http://www.example.com/contact_form to http://www.example.com/contact-form. contact_form is controller name.. need to replace underscore with hyphen so as to make the URL SEO friendly..
-
Answer:
Add this to your routes.php $routes['contact-form'] = 'contact_form'; Go check out the defining routes in the user guide. It basically maps the URL of contact-form to your controller that named contact_form. That is just the basic, you can do more.
Kong Jin Jie at Quora Visit the source
Related Q & A:
- How to do lots of 301 Redirect (Tomcat?Best solution by Stack Overflow
- How to set permanent 301 redirect with htaccess?Best solution by Quora
- How to you switch back to the old yahoo home page. I hate the new home page?Best solution by Yahoo! Answers
- How do I export my iTunes from old computer to new computer?Best solution by Yahoo! Answers
- How do I change a URL for?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.