2016-10-27 1 views
0

robot.txt 파일에서 허용 된 후에도 Google bot은 내 css 및 js를 읽을 수 없습니다. 사이트는 Wordpress로 제작되었습니다. 아래는 내 robot.txt 파일입니다. 내가 코멘트에서 쓰기를 같이Robot.txt를 허용 한 후에도 Google Bot이 내 css 및 js를 읽을 수 없습니다.

User-agent: * 
Allow:/
Disallow: /wp-admin/ 
Disallow: /timeclock/ 
Disallow: /staging/ 

User-agent: Mediapartners-Google* 
Allow:/

User-agent: Googlebot-Image 
Allow: /wp-content/uploads/ 
Allow: /*.css$ 

User-agent: Adsbot-Google 
Allow:/
Allow: /*.css$ 

User-agent: Googlebot-Mobile 
Allow:/
Allow: /*.css$ 

User-agent: Googlebot 
Allow:/
Allow: /* .js* 
Allow: /* .css* 
+0

를'허용 :/*의 .js *''허용 :/* .CSS *'넣어하려고 *이 명령을 쓰면 보통 메모가/*로 닫히고 */ 에 의해 닫힙니다. 그러면 내가 생각하기에 작업을 삭제해야한다는 것을 알 수 있습니다. –

답변

0

, 당신은 unse 필요가 없습니다/*이 메모를 추가 사용하고,/*로 열고 */가깝습니다. 이런 방식으로 코드를 변경하는 경우 작업을 참조하려고 : 난 당신이 사용을 필요로하지 않는 생각

User-agent: * 
Allow:/
Disallow: /wp-admin/ 
Disallow: /timeclock/ 
Disallow: /staging/ 

User-agent: Mediapartners-Google* 
Allow:/

User-agent: Googlebot-Image 
Allow: /wp-content/uploads/ 
Allow: /.css$ 

User-agent: Adsbot-Google 
Allow:/
Allow: /.css$ 

User-agent: Googlebot-Mobile 
Allow:/
Allow: /.css$ 

User-agent: Googlebot 
Allow:/
Allow: /.js 
Allow: /.css 
+0

시간 내 주셔서 감사합니다. 그러나 여전히 작동하지 않습니다. –

+0

하지만 왜 Google은 당신이 CSS를 읽고 싶어? 당신은 구글 내부의 일부 콘텐츠가 html에서 읽을 수 있다면. –

관련 문제