2016-04-29 29 views
1

我想在子目錄不允許一個頁面嘗試在子目錄中不允許一個頁面

我使用robots.txt的代碼是

User-Agent: * 
Disallow: 
Disallow: /form.aspx 

但form.aspx是processfolder和我網址顯示如 www.yoursite.com/process/form.aspx

所以我怎麼能不允許form.aspxrobots.txt

上面給出的格式robots.txt:是不是?

請指導

回答

0

如果你想阻止http://example.com/process/form.aspx,讓一切,你可以使用:

# robots.txt on <http://example.com/robots.txt> 
User-agent: * 
Disallow: /process/form.aspx 

注意,這也將阻止的URL像http://example.com/process/form.aspx.foohttp://example.com/process/form.aspx/bar