Skip to content

Instantly share code, notes, and snippets.

View 1999's full-sized avatar

Dmitrii Sorin 1999

View GitHub Profile
server {
if ( $host ~ ^allcafe\.(info|ru)$ ) {
rewrite ^/(.*)$ http://www.allcafe.info/$1 permanent;
}
if ( $host ~* ^www\.([a-z]+)\.allcafe\.(info|ru)$ ) {
set $domain $1;
rewrite ^/(.*)$ http://$domain.allcafe.info/$1 permanent;
}
<?php
$joinedURI = implode( '/', $url );
$pageObj = getValueFromRegistry( '__database' )->select()
->from( 'pages' )
->columns( '*' )
->where( 'LEFT( ?, LENGTH( uri ) ) = uri', $joinedURI )
->where( 'visible = 1' )
->orderBy( array( 'LENGTH( uri ) DESC' ) )
server {
if ( $host ~ ^allcafe.(info|ru)$ ) {
rewrite ^/(.*)$ http://www.allcafe.info/$1 permanent;
}
if ( $host ~* ^www\.([a-z]+)\.allcafe\.(info|ru)$ ) {
set $domain $1;
rewrite ^/(.*)$ http://$domain.allcafe.info/$1 permanent;
}
./configure \
--prefix=/opt/local \
--exec-prefix=/opt/local \
--sysconfdir=/etc/opt/httpd \
--enable-so \
--disable-cgi \
--with-port=81 \
--enable-rewrite=static \
--with-mpm=prefork