Issue
Google wants have access to ads.txt file like "example.com/ads.txt", but in Laravel we need redirect it to "public" folder.
How do it?
I try RedirectMatch 301 ^ads\.txt$ \/public\/ads\.txt
, but it doesn't work.
Solution
You can create blade file has name ads.blade.php
and put all text from ads.txt
to this blade , and create route like that :
Route::get('/ads.txt',function(){
return view('ads');
});
I tried that when register my website in google
Answered By - Ahmad Abo Zaid
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.