From e33c245d910e55b8cab407a03e669470509a705d Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Fri, 10 Mar 2017 21:46:12 +0100 Subject: Several changes have been made in this commit, which together with the previous commits result in version 1.1: + The rules for the Apache and nginx configuration have been changed and redirects now all requests to the index.php. + A router class has been added which now handles all requests that arrives at the application on the index.php. + Short-hand functions "PAGE", "POST" and "USER" for use in templates added to get specific item data by ID. + More language variables have been added to the core language. --- .htaccess | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to '.htaccess') diff --git a/.htaccess b/.htaccess index af8639d..2a87ccc 100644 --- a/.htaccess +++ b/.htaccess @@ -23,19 +23,12 @@ ErrorDocument 404 /system/404.php #=============================================================================== # Forbidden directories #=============================================================================== -RewriteRule ^core|template/(.*)/(html|lang)/ - [F] +RewriteRule ^(core|template/([^/]+)/(html|lang)/) - [F] #=============================================================================== # Main rules #=============================================================================== -RewriteRule ^(page|post|user)/([^/]+)/$ system/$1/main.php?param=$2 [L] -RewriteRule ^(page|post|user)/$ system/$1/list.php [L] -RewriteRule ^feed/(page|post)/$ system/feed/main.php?item=$1 [L] -RewriteRule ^(feed|search)/$ system/$1/main.php [L] +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d -#=============================================================================== -# Trailing slashes -#=============================================================================== -RewriteRule ^(page|post|user)/([^/]+)$ %{REQUEST_URI}/ [R,L] -RewriteRule ^(page|post|user|feed|search)$ %{REQUEST_URI}/ [R,L] -RewriteRule ^feed/(post|page)$ %{REQUEST_URI}/ [R,L] \ No newline at end of file +RewriteRule ^(.*)$ index.php [L] \ No newline at end of file -- cgit v1.2.3