Difference between revisions of "API:EPrints/Apache/Rewrite"

From EPrints Documentation
Jump to: navigation, search
(Removing all content from page)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
<!-- Pod2Wiki=_preamble_
 +
This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
 +
-->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/Apache/Rewrite.pm|package_name=EPrints::Apache::Rewrite}}[[Category:API|REWRITE]][[Category:API:EPrints/Apache|REWRITE]]<div><!-- Edit below this comment -->
  
 +
 +
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
 +
==NAME==
 +
'''EPrints::Apache::Rewrite''' - rewrite cosmetic URLs to internally  useful ones.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_description -->
 +
==DESCRIPTION==
 +
This rewrites the URL Apache receives based on certain things, such as the current language.
 +
 +
Expands ''/archive/00000123/*'' to ''/archive/00/00/01/23/*'' and so forth.
 +
 +
This should only ever be called from within the <tt>mod_perl</tt> system.
 +
 +
This also causes some pages to be regenerated on demand, if they are  stale.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_methods -->
 +
==METHODS==
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_handler -->
 +
===handler===
 +
 +
$rc = EPrints::Apache::Rewrite::handler( $r )
 +
Handler for managing an EPrints rewrite request <tt>$r</tt>.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_redir_permanent -->
 +
===redir_permanent===
 +
 +
$rc = EPrints::Apache::Rewrite::redir_permanent( $r, $url )
 +
Redirect permanently (<tt>301 Moved Permanently</tt>) request <tt>$r</tt> to URL  specified by <tt>$url</tt>.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_redir -->
 +
===redir===
 +
 +
$rc = EPrints::Apache::Rewrite::redir( $r, $url )
 +
Redirect temporarily (<tt>302 Found</tt>) request <tt>$r</tt> to URL specified by  <tt>$url</tt>.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_redir_see_other -->
 +
===redir_see_other===
 +
 +
$rc = EPrints::Apache::Rewrite::redir_see_other( $r, $url )
 +
Redirect the request <tt>$r</tt> to another resource (<tt>303 See Other</tt>)  specified by the URL in <tt>$url</tt>.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_content_negotiate_best_plugin -->
 +
===content_negotiate_best_plugin===
 +
 +
$rc = EPrints::Apache::Rewrite::content_negotiate_best_plugin( $repository, %o )
 +
Determine the best content type to provide based on the options  provided by <tt>%o</tt>.
 +
 +
Returns a string containing the best content type (e.g. <tt>text/html</tt>).
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_copyright -->
 +
==COPYRIGHT==
 +
{{API:Copyright}}
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->

Latest revision as of 17:00, 15 March 2023

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::Apache::Rewrite - rewrite cosmetic URLs to internally useful ones.

User Comments


DESCRIPTION

This rewrites the URL Apache receives based on certain things, such as the current language.

Expands /archive/00000123/* to /archive/00/00/01/23/* and so forth.

This should only ever be called from within the mod_perl system.

This also causes some pages to be regenerated on demand, if they are stale.

User Comments


METHODS

User Comments


handler

$rc = EPrints::Apache::Rewrite::handler( $r )

Handler for managing an EPrints rewrite request $r.

User Comments


redir_permanent

$rc = EPrints::Apache::Rewrite::redir_permanent( $r, $url )

Redirect permanently (301 Moved Permanently) request $r to URL specified by $url.

User Comments


redir

$rc = EPrints::Apache::Rewrite::redir( $r, $url )

Redirect temporarily (302 Found) request $r to URL specified by $url.

User Comments


redir_see_other

$rc = EPrints::Apache::Rewrite::redir_see_other( $r, $url )

Redirect the request $r to another resource (303 See Other) specified by the URL in $url.

User Comments


content_negotiate_best_plugin

$rc = EPrints::Apache::Rewrite::content_negotiate_best_plugin( $repository, %o )

Determine the best content type to provide based on the options provided by %o.

Returns a string containing the best content type (e.g. text/html).

User Comments


COPYRIGHT

© Copyright 2023 University of Southampton.

EPrints 3.4 is supplied by EPrints Services.

http://www.eprints.org/eprints-3.4/

LICENSE

This file is part of EPrints 3.4 http://www.eprints.org/.

EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.

EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.

User Comments