⧼vector-jumptocontent⧽

API:EPrints/Apache/Rewrite: Difference between revisions

From EPrints Documentation
Pod2wiki (talk | contribs)
No edit summary
Pod2wiki (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
==NAME==
==NAME==
'''EPrints::Apache::Rewrite''' - rewrite cosmetic URL's to internally useful ones.
'''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%; '>
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Line 17: Line 17:
<!-- Pod2Wiki=head_description -->
<!-- Pod2Wiki=head_description -->
==DESCRIPTION==
==DESCRIPTION==
This rewrites the URL apache receives based on certain things, such as the current language.
This rewrites the URL Apache receives based on certain things, such as the current language.


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


and so forth.
This should only ever be called from within the <tt>mod_perl</tt> system.


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.
 
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%; '>
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Line 47: Line 45:


  $rc = EPrints::Apache::Rewrite::handler( $r )
  $rc = EPrints::Apache::Rewrite::handler( $r )
Handler for managing EPrints rewrite requests.
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%; '>
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>

Latest revision as of 17:00, 15 March 2023

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 2000-2024 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