Here's another example similar to Keith's...This is something I'm
planning to add as an out-of-the-box setting for DSpace XMLUI (so it
should be default for the 1.5.2 release).
In this case, you want to add this code to your *theme's* sitemap.xmap
file. I'd suggest adding it near the top, directly after the <map:match
pattern="themes/*/**"> section:
<!--Load completely static content (*.txt or *.html) when requested-->
<map:match pattern="*.txt">
<map:read src="static/{1}.txt"/>
</map:match>
<map:match pattern="*.html">
<map:read src="static/{1}.html"/>
</map:match>
In the above case, any static content (*.txt or *.html) in your DSpace
webapp will be loaded from the "static/" subfolder under your currently
installed theme. So, this would allow you to place a robots.txt in that
"static" directory, or any number of static HTML webpages there.
NOTE: The above "patterns" will NOT match any HTML or Plain Text
content you upload into DSpace, as those appear under the
"bitstream/handle/*/**" path when you view them.
Hope that helps!
- Tim
Keith Gilbertson wrote:
> Hi Eric. One way to do this could be to make a small change to the
> sitemap.xmap file in the xmlui directory. Here's an example from the
> non-bitstream pipeline in the sitemap.xmap file of one of our DSpace
> instances:
>
> <map:match pattern="robots.txt">
> <map:read
> src="themes/WSU/static_html/robots.txt" mime-type="text/plain" />
> </map:match>
>
> In our case, we placed the robots.txt file in a subdirectory, but
> something similar may work if you want to put the file in the xmlui folder.
>
>
> Keith Gilbertson
> OhioLINK
>
> Eric Luhrs wrote:
>> I'm trying to figure out how to add a robots.txt file to xmlui. I
>> tried placing it in [dspace]/webapps/xmlui (which is where Tomcat's
>> ROOT points) but that didn't work. When I attempt to access it, I get
>> the standard "Page not found" message. Do I need to create a static
>> manakin page that overrides the document tree and lists/imports the
>> proper lines for robots.txt? A similar question was posted here last
>> month, but there were no replies.
>>
>> Eric Luhrs
>> Lafayette College
>> ------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
>> -Strategies to boost innovation and cut costs with open source participation
>> -Receive a $600 discount off the registration fee with the source code: SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> DSpace-tech mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>>
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
--
Tim Donohue
Research Programmer, IDEALS
http://www.ideals.uiuc.edu/
University of Illinois
[email protected] | (217) 333-4648
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech