Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created a site collection search scope and I am trying to exclude dispform.aspx and allitems.aspx from the search results. The crawl rule at the site collection scope doesn't seem to work with regular expressions. I have tried the below, but not working

http://<sitename>/*DispForm.aspx*

http://<sitename>/.*DispForm.aspx*

This is with complete path to dispform of a list

http://<sitename>/<subsite>/Lists/<listname>/DispForm.aspx*

None of these are working for me. Any help is appreciated.

share|improve this question
    
A related question (I know this was earlier, but just to connect them): sharepoint.stackexchange.com/questions/51266/… –  Russell Jan 9 at 6:59

3 Answers 3

If you don't want to index a particular list, Mark NO to "Allow items from this library to appear in search results" in the list settings.

Or

The a dirty approach might be to modify the XSLT of the search results page to hide it that way.

share|improve this answer
    
Thanks for the reply. I want the list to be searched and I have included only that in the scope, however I don't want allitems.aspx, dispform.aspx in the results. I know xslt can be modified, but looking at a easier approach –  Rajesh Nov 9 '12 at 7:50

You can add a Rule to your scope to exclude all aspx files. Using the answer I posted here: http://sharepoint.stackexchange.com/a/51338/2881

Scope Rule Type: Property Query

Property Query: FileExtension = aspx

Behavior: Require


In order to have the FileExtension property be available you will need to go to Search Administration within Central Administration and edit the FileExtension Managed Property (Search Administration > Metadata Properties and find FileExtension). Check the box "Allow this property to be used in scopes" checkbox and click OK. Then run a full crawl.

Do yourself a favor and check that box for the ContentType managed property as well. Then you can add an additional Property Query rule that excludes folders by excluding ContentType = Folder.

share|improve this answer

By adding crawling rules using resgular expressions we can hide the system pages from the search results, do the following steps:

  1. Go to Search Service Application: Manage Crawl Rules page and click on "Crawl New Rule"
  2. Crawl New Rule page add path "*://dispform.aspx" and select the option "Exclude all items in this path" and check the "Exclude complex URLs (URLs that contain question marks - ?)" in Crawl Configuration section
  3. Go to "Index Reset" and reset the search index
  4. Go to Content Source page and "Start Full Crawl" for required Applicion

Search the appliction and the DispForm.aspx page disappers from the results page.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.