• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question about sitemap

Hi everybody, i am new in CI and dont know much about coding. i have just started a matrimonial site and buy a matrimonial script from ACTIVE ZONE that developed in CI.

I have placed sitemap.xml file in route folder, but it gives error 404.
Can you give me some suggestion?


You wrote "route" folder, but I assume you meant "root" folder. Right?

You should not expect to be able to see robots.xml with the browser. Actual robots use cURL, file_get_contents() or other means to read the contents of that file.

Try this snippet to read the contents. It assumes that robots.xml is in the same folder with CI's index.php

PHP Code:
$response file_get_contents('http://yoursite.com/robots.xml');

if (
FALSE === $response)
    echo "file_get_contents failed";


The display won't be pretty, but you should see the contents.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By , © 2002-2020 .