CodeIgniter Forums

Full Version: Make URLs SEO friendly and redirect old URLs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

I am new to codeignitor, I want to make the URL's SEO friendly, and for this I want make changes in url.

for example my page is domain.com/aboutus

I want to change it to   domain.com/about-us

for this I have added the following code in routes.php

$route['about-us'] = "About/index";


I also want to redirect my old url (domain.com/aboutus) to new url ( domain.com/about-us ) .

for automatic redirection, I have added the following code in .htaccess file

Redirect  "/aboutus" "/about-us"

this code is redirecting the old link, but It's added extra content in url (about-us?id=aboutus )


Please guide me how can I remove the extra content (?id=aboutus) from URL and why is it adding.


Thanks in advance.