I am creating a website in Laravel 5.8 and using Spatie sitemap package to create Sitemap dynamically, It doesn't crawl my website and only generates homepage URL.
Route::get('/sitemap',function(){
SitemapGenerator::create( 'http://localhost/' )->writeToFile('sitemap.xml');
})->name('sitemap-generator');
Note: But when I map website with a virtual host, It is working properly.
Route::get('/sitemap',function(){
SitemapGenerator::create( 'http://local.project.com/' )->writeToFile('sitemap.xml');
})->name('sitemap-generator');
Any help will be appreciated.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire