Ado
view release on metacpan or search on metacpan
templates/partials/apache2htaccess.ep view on Meta::CPAN
# Using Plack with FCGI and FCGI::ProcManager
FcgidWrapper "<%= "$plackup $root/bin/$moniker -s FCGI -l $sock" %>"
% }
% if($has_msfcgi){
# Use your own perl. You may need to fix paths if they contain spaces.
# Using Mojo::Server::FastCGI.
# Uncomment the following (and comment any previous "FcgidWrapper")
# if you prefer Mojo::Server::FastCGI.
<%= $plackup? '#':''%> FcgidWrapper "<%= "$args->{perl} $root/bin/$moniker" %> fastcgi"
% }
</IfModule>
% }
# Make Ado handle any 404 errors.
ErrorDocument 404 /bin/<%=$moniker%>
DirectoryIndex /bin/<%=$moniker%>
#Some more security. Redefine the mime type for the most common types of scripts
AddType text/plain .shtml .php .php3 .phtml .phtm .pl .py .cgi
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# Set "protossl" to "s" if we were accessed via https://. This is used later
# if you enable "www." stripping or enforcement, in order to ensure that
# you don't bounce between http and https.
# RewriteRule ^ - [E=protossl]
# RewriteCond %{HTTPS} on
# RewriteRule ^ - [E=protossl:s]
# Make sure Authorization HTTP header is available to Ado
# even when running as CGI or FastCGI.
# RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Block access to "hidden" directories whose names begin with a period.
# RewriteRule "(^|/)\." - [F]
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# uncomment the following:
# RewriteCond %{HTTP_HOST} .
# RewriteCond %{HTTP_HOST} !^www\. [NC]
# RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment the following:
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
# RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# use the following line:
# RewriteBase /
# Otherwise set RewriteBase to the subdirectory where your site is, e.g. /<%=$moniker%>.
# RewriteBase /<%=$moniker%>
# Redirect all requests for Ado static files to public/ directory.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^((css|doc|fonts|img|js|vendor|favicon|index)\b.*)$ /public/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /bin/<%=$moniker%>/$1 [L]
</IfModule>
( run in 1.751 second using v1.01-cache-2.11-cpan-5735350b133 )