CodeIgniter Forums
Make URLs SEO friendly and redirect old URLs - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Make URLs SEO friendly and redirect old URLs (/showthread.php?tid=74657)



Make URLs SEO friendly and redirect old URLs - Developer - 10-21-2019

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.


RE: Make URLs SEO friendly and redirect old URLs - InsiteFX - 10-21-2019

How to make “truly” SEO friendly URLs in CodeIgniter (without “duplicate content” on underscore URLs)

How to Generate SEO Friendly URL in CodeIgniter