Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


   


   


   















      :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rewrites SocialEngine


  • To: nginx-ru@xxxxxxxxx
  • Subject: Rewrites SocialEngine
  • From: Anton Koldaev <koldaevav@xxxxxxxxx>
  • Date: Fri, 14 Jan 2011 16:26:52 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=lzmCkLYFxsxLcKAQq5yd3SdDWWqC+nCdCK+1xaDPhA0=; b=b8zRCrGXwgWnFxS4kyV8K/mqKyFtD7mr7pfNneuNRn0lAJd5D7j1pgBR+SIKGCiQif paE4FSVITb8eEJbP+LKq8xhpPD277WKgHKOvIoCpILctCD06fHcRPk8v+XU+xhdf235r kWeL6otsDXA9eLBdAPz84E5dP5P4iXty0pcnY=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=OaiW1wB+TPFq1IS4hmDD5DLmwuDure3twayefTfVgEQ3VImtNG41qOOi0nCfQ1zK5J zxDPVAu5gxRKxL8ZQRv9UUGBBHil79LijBUpiC6F8f+T9VqAiBnC16TVD8rDfHcj01bb 27hqdgEjjeVb/Kc+BgcKimxgbvg8PtZl1L0jg=

SocialEngine Apache2+mod_rewrite nginx_0.7.67+php-fpm
.htacess.
$DOCROOT/.htaccess:
# Get rid of index.php
RewriteCond %{REQUEST_URI} /index\.php
RewriteRule (.*) index.php?rewrite=2 [L,QSA]
# Rewrite all directory-looking urls
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*) index.php?rewrite=1 [L,QSA]
# Try to route missing files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} public\/ [OR]
RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
RewriteRule . - [L]
# If the file doesn't exist, rewrite to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]
$DOCROOT/install/.htaccess:
# Get rid of index.php
RewriteCond %{REQUEST_URI} /index\.php
RewriteRule (.*) index.php?rewrite=2 [L,QSA]
# Rewrite all directory-looking urls
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*) index.php?rewrite=1 [L,QSA]
# Special cases
RewriteCond %{REQUEST_URI} static
# RewriteRule (.*) Boostrap.php [L,QSA]
RewriteRule (.*) index.php?rewrite=1 [L,QSA]
# Try to route missing files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} public\/ [OR]
RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
RewriteRule . - [L]
# If the file doesn't exist, rewrite to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]
:
# Get rid of index.php
location /index.php {
rewrite ^/(.*)$ /index.php?rewrite=2 last;
}

# Rewrite all directory-looking urls
location ~ /$ {
rewrite ^/(.*)$ /index.php?rewrite=1 last;
}

# Try to route missing files
,

# If the file doesn't exist, rewrite to index
try_files $uri $uri/ @exist;
location @exist {
rewrite ^(.*)$ /index.php?rewrite=1 last;
}

redirect loop 500. rewrite-log nginx SocialEngine . , .

--
Best regards,
Koldaev Anton
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.