Recipe for creating Dynamic sitemap with CodeIgniter. Like yoursite.com/sitemap.xml Example. Suppose you have an articles blog where url for each article is by article ID Like yoursite.com/123 . All articles are stored in articleTable of the database. First Create a model to get URLs. Create a file named url_model.php in application/models directory. Get Urls from database <?php class Url_model extends CI_Model{ public function __construct(){…
Posts Tagged
CodeIgniter
How to : Replace underscore “_” with hyphen “-” in CodeIgniter
Hello there, Since last couple of days I am aware of on-site SEO. There I found that underscore in URL is not recommended rather hyphen is good for SEO. But in PHP class method hyphen is not allowed rather underscore is recommended. So when you make a method in controller class over CI its difficult…
Enable mod_rewrite in linux
Today I fight a lot for working over my CI_2.0.3 projects on linux mint 11 (katya). As I am a windows user trying to convert myself in linux. It was very confusing about file permission and other silly stuff in linux. And its little scary when I get my fist page in each projects but…