Google要求我点击链接www.domain.com/dummy_text.html
验证我的网站,但每当我点击此链接时,我都会收到NotFoundHttpException
错误。如何访问公用文件夹中的文件并避免此错误?
谢谢!
答案 0 :(得分:2)
Google验证HTML文件可以直接复制到您的公用文件夹
将您的google *************。html文件复制到公用文件夹
,您可以按以下方式直接访问
https://www.yourwebsite.com/google*************.html
答案 1 :(得分:0)
RewriteCond $1 !^(index\.php|public|robots|google5959595959\.html)
RewriteRule ^([0-9A-Za-z-:._/\x7f-\xff]*)$ /public/index.php/$1 [L]
答案 2 :(得分:0)
首先,您需要转到Google Search Console创建要验证的网站实例。 之后,请执行以下操作。
1)将下载的Google验证文件上传到您的公共目录。
2)假设Google验证文件的名称为“ google97ce02dabcfc3bb5.html”, 使用以下配置编辑站点的.htaccess文件。
#Start of Google Analytics verification for Laravel
RewriteCond $1 !^(index\.php|public|robots|google97ce02dabcfc3bb5\.html)
RewriteRule ^([0-9A-Za-z-:._/\x7f-\xff]*)$ /public/index.php/$1 [L]
#End of Google Analytics Verification for Laravel