Welcome Guest, Not a member yet? Register   Sign In
question about sitemap
#2

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('https://yoursite.com/robots.xml');

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

echo 
$response;


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


Messages In This Thread
question about sitemap - by diglomen - 02-11-2020, 09:25 PM
RE: question about sitemap - by dave friend - 02-12-2020, 09:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB