Hướng dẫn sửa lỗi base href trên google cache cho vbb

  • Thread starter Thread starter AdminAdmin is verified member.
  • Start date Start date
Admin

AdminAdmin is verified member.

Well-Known Member
Staff member
Administrator
Các bạn mở headinclude template, tìm đoạn này
HTML:
<base href="{vb:raw basepath}" /><!--[if IE]></base><![endif]-->
Sau đó thêm ngay phía sau đoạn đó và save lại.

HTML:
<!--Start:  Fix Base Path IN Google Cache, Code by: Vũ Thanh Lai - SinhVienIT.Net -->
<script type="text/javascript">
<!--
	
	var curBaseTag = document.getElementsByTagName('base')[0], correctBasePath = "{vb:raw basepath}";
	if (typeof curBaseTag!='undefined' && curBaseTag!=null && curBaseTag.href != correctBasePath)
		curBaseTag.href = correctBasePath;
	if(correctBasePath=='')
	{
		curBaseTag.href=window.location.protocol+'//'+window.location.host+'/forum/'; 
		// Đoạn này thay forum bằng thư mục chứa code diễn đàn của bạn (hoặc bỏ đi cũng được)
	}
-->
</script>
<!--End:  Fix Base Path IN Google Cache, Code by: Vũ Thanh Lai - SinhVienIT.Net -->
Chúc các bạn thành công.
Nguồn: SVIT
 

Facebook Comments

Similar threads

V
Replies
0
Views
5K
vanvangit
V
Admin
Replies
0
Views
2K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
39K
AdminAdmin is verified member.
Admin
Admin
Replies
1
Views
3K
tanvuong2503
T
Admin
Replies
0
Views
2K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
3K
AdminAdmin is verified member.
Admin
Back
Top