jbogdani/BraDyCMS/master/.htaccess
RewriteEngine on
RewriteBase /
# robots
RewriteRule ^robots.txt$ controller.php?obj=seo_ctrl&method=robots
#sitemap
RewriteRule ^sitemap.xml$ controller.php?obj=seo_ctrl&method=sitemap
# www to non-www url syntax
RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
#safe site, js and css, tiny_mce
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (css|sites|js|img|xsl|fonts)/(.+) $1/$2
RewriteRule ^feed/rss$ controller.php?obj=feeds_ctrl&method=rss2 [QSA,L]
RewriteRule ^feed/atom$ controller.php?obj=feeds_ctrl&method=atom [QSA,L]
#OAI
RewriteRule ^(OAI|oai)$ controller.php?obj=OAI_ctrl&method=run [QSA,L]
#api
RewriteRule ^(api|API)/?(.+)$ controller.php?obj=api_ctrl&method=run&$1 [QSA,L]
#admin
RewriteRule ^admin/?$ admin.php
#safe home page
RewriteRule ^([a-z]{2})/?$ index.php?lang=$1 [L]
#tags: (ln/)some-tag.all !paginate
RewriteRule ^([a-z]{2})/([a-zA-Z0-9-_+~]+).all(/[0-9]{1,2})?$ index.php?lang=$1&tags=$2&page=$3 [QSA,L]
RewriteRule ^([a-zA-Z0-9-_+~]+).all(/[0-9]{1,2})?$ index.php?tags=$1&page=$2 [QSA,L]
#article title: (ln/)sometitle
RewriteRule ^([a-z]{2})/([a-zA-Z0-9-_]+)/?$ index.php?lang=$1&art_title=$2 [QSA,L]
RewriteRule ^([a-zA-Z0-9-_]+)/?$ index.php?art_title=$1 [QSA,L]
#Drafts: article title: (ln/)sometitle.draft
RewriteRule ^([a-z]{2})/([a-zA-Z0-9-_]+).draft$ index.php?lang=$1&art_title=$2&draft=1 [L]
RewriteRule ^([a-zA-Z0-9-_]+).draft$ index.php?art_title=$1&draft=true [L]
#search string: (ln/)search:some string !paginate
RewriteRule ^([a-z]{2})/search:([^/]+)(/[0-9]{1,2})?$ index.php?lang=$1&search=$2&page=$3 [QSA,L]
RewriteRule ^search:([^/]+)(/[0-9]{1,2})?$ index.php?search=$1&page=$2 [QSA,L]
#search tags: (ln/)some-tags.search !paginate
RewriteRule ^([a-z]{2})/([a-zA-Z0-9-_+~]+).search(/[0-9]{1,2})?$ index.php?lang=$1&tags=$2&is_search=1&page=$3 [QSA,L]
RewriteRule ^([a-zA-Z0-9-_+~]+).search(/[0-9]{1,2})?$ index.php?tags=$1&is_search=1&page=$2 [QSA,L]
#all non existing, non image content to index.php http://jrgns.net/redirect_request_to_index/
RewriteCond %{REQUEST_URI} !.(gif|jpg|png)$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php?art_title=not_found [L]
#ErrorDocument 404 /index.php?art_title=not_found
<FilesMatch ".(htaccess|htpasswd|ini|log|inc|bak|sqlite|json)$">
order allow,deny
deny from all
</FilesMatch>
<FilesMatch ".(png|jpg|jpeg|gif)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
On Github License
Files