A Practical Guide to SharePoint 2013

A Practical Guide to SharePoint 2013
A Practical Guide to SharePoint 2013 - Book by Saifullah Shafiq

Tuesday, February 27, 2007

Searching PHP Sites With SharePoint

Originally posted: Tue, Feb 27, 2007
Reposted: Aug 25, 2007
Some of the links might not work as this version was retrieved from a web archive. If you find any dead links, kindly send an email to share.point@yahoo.com with the URL of this page. Thank you!
Searching PHP Sites With SharePoint
In this walk through, I will setup search that will return data from the PHP site configured on an Apache server.
1. Go to "SharePoint 3.0 Central Administration" and select the Shared Service Provider that you have set up for your sites.
2. Click Search settings.
3. Click Content sources and crawl schedules under "Crawl Settings".
4. Click New Content Source.
5. Enter a name for your search. Select Web Sites in the "Content Source Type". Enter a URL in the "Start Addresses". This should be the complete URL including the page name. You can customize the crawl settings according to your own needs. For this demo, I selected the first option (Only crawl within the server...) but if you have a fairly large site, you may want to select the custom settings. You can enter a value for "Limit Page Depth". If unchecked, it will search unlimited pages which may not be a good idea if you intend to keep the server hops limit set to "unlimited". Check "Start full crawl of this content source" check box and click the OK button.
6. Now go back to the Search Service Provider page and click Search Settings. On "Configure Search Settings" page, click Crawl rules.
7. Click New Crawl Rule link.
8. Enter a path to the PHP site in the Path, for example, to include all pages in the site, you can enter http://server/phpbb2/*. This will include all site pages or to include only a single page in the search, you can enter a page path like http://server/phpbb2/index.php. This will search only the index.php page. You can also use this interface to exclude items from the search. In fact, you can create multiple rules to manage your search results. To continue with this walk through, we will select Include all items in this path in "Crawl Configuration". You can also specify the authentication type in "Specify Authentication". Note, this is not the web site login credentials, this is the web site access settings, configured in the HTTP server. Click OK to save the changes. You will have to re-crawl the site because you have just created a new rule and new content must be indexed before it appears in the results.
9. Go back to "Configure Search Settings" page and click File types. Make sure PHP is included in the extensions list. If it's not included, click the New File Type button and enter PHP in the box and click the OK button.
10. To create a new scope for the PHP search, go to "Configure Search Settings" page and click View scopes link in the Scopes section
11. Click New Scope.
12. Enter title and description for the new scope. For this demo, we will select Use the default Search Results Page option in the "Target Results Page" but for real application, I would select the second option, that is, Specify a different page for searching this scope. To see how to create new search page and scopes, see following articles:
Click OK to save the changes.
13. New scope will have been added to the scopes page. Click Add rules link to add rules for this new scope.
14. This is the most important page. You can define rules here. For demo, I selected the first option and in the "Web Address" section, I entered the web application URL without the page name. Select Include in the "Behavior" section and click OK to save the settings.
The other option is to select a Property query in "Scope Rule Type".
You can select a property from the drop down box containing available properties and enter a value for that property.
You can also search the content types and include the content type that you just created for your PHP search.
and the most simplest option is to select All Content, that will search all content available to the search.
15. Open a SharePoint site in a new browser and go to the Search page. Enter a keyword to test the PHP search and click the search icon. Here are the results that I got:
Notice that I am using the All Sites search to search the PHP pages. Ideally, I would add a new tab for the PHP search and connect that tab with the scope that I created for the PHP search. To see how to add a new tab and connect it with a new search scope, see following articles:

No comments:

Post a Comment