Best Way To Add Sitemap |
Here is how I do it:
Before Starting here are some variables and considerations for this specific topic: - I only have one dynamic pages called blog - I have a few static pages Step 1: Controller I create a controller usually calling it seo.php PHP Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Step 2: View PHP Code: <?php echo '<?xml version="1.0" encoding="UTF-8" ?>' ?> Step 3: Route (config/routes.php) In this step I just make sitemap.php be read as sitemap.xml PHP Code: $route['seo/sitemap\.xml'] = "seo/sitemap"; |
Messages In This Thread |
Best Way To Add Sitemap - by bradm - 07-09-2015, 09:06 PM
RE: Best Way To Add Sitemap - by ivantcholakov - 07-10-2015, 06:28 AM
RE: Best Way To Add Sitemap - by edoramedia - 07-12-2015, 10:59 PM
RE: Best Way To Add Sitemap - by arma7x - 07-13-2015, 12:24 AM
RE: Best Way To Add Sitemap - by fcodebue - 12-05-2016, 12:25 PM
RE: Best Way To Add Sitemap - by cartalot - 12-05-2016, 05:27 PM
|