diff --git a/.gitignore b/.gitignore index f9380db..844ee15 100644 --- a/.gitignore +++ b/.gitignore @@ -329,8 +329,14 @@ ASALocalRun/ # MFractors (Xamarin productivity tool) working folder .mfractor/ -macOS hidden filesystem meta info +# macOS hidden filesystem meta info ._* -Zip Files -*.zip \ No newline at end of file +# Zip Files +*.zip + +config.php + +system/registrations.php + +*.lst \ No newline at end of file diff --git a/README.md b/README.md index 8355889..ac28593 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ This is a simple Hello World! for this framework. ```html

{{ variable }}

``` -5. Edit the constants *HTTP_URL* and *DIR_APPLICATION* in file **config.php**. Edit others _DIR\_\*_ constants path if necessary. +5. Rename config.dist.php to config.php and edit the constants *HTTP_URL* and *DIR_APPLICATION* in file **config.php**. Edit others _DIR\_\*_ constants path if necessary. ```php ' - ExacTI phacil', - 'config_mail_protocol'=>'smtp', + 'config_mail_protocol'=>'mail', 'config_error_display' => 1, 'config_template' => "default", 'config_error_filename'=> 'error.log'); //App folders -define('DIR_APPLICATION', '/Applications/MAMP/htdocs/phacil/'); +define('DIR_APPLICATION', '/patch/to/app/folder/'); define('DIR_LOGS', DIR_APPLICATION.'logs/'); define('DIR_PUBLIC', DIR_APPLICATION.'public_html/'); define('DIR_SYSTEM', DIR_APPLICATION.'system/'); diff --git a/controller/error/not_found.php b/controller/error/not_found.php index 717241a..3a2159b 100644 --- a/controller/error/not_found.php +++ b/controller/error/not_found.php @@ -1,11 +1,18 @@ document->setTitle('404 %s'); - header("HTTP/1.1 404 Not Found"); - header("Status: 404 Not Found"); + $this->response->addHeader("HTTP/1.1 404 Not Found"); + $this->response->addHeader("Status: 404 Not Found"); $this->children = array( 'common/footer', diff --git a/public_html/.htaccess b/public_html/.htaccess index 430e3ec..cfaf20f 100644 --- a/public_html/.htaccess +++ b/public_html/.htaccess @@ -1,24 +1,3 @@ -AddType application/font-woff woff -AddType application/x-httpd-php esp -ExpiresActive on -ExpiresByType image/png "access plus 7 days" -ExpiresByType image/gif "access plus 7 days" -ExpiresByType image/jpeg "access plus 7 days" -# woff font type -ExpiresByType application/font-woff "access plus 7 days" -# css may change a bit sometimes -ExpiresByType text/css "access plus 7 days" -# special MIME type for icons -AddType image/vnd.microsoft.icon .ico -AddType application/x-shockwave-flash .swf -# now we have icon MIME type, we can use it -# my favicon doesn't change much -ExpiresByType image/vnd.microsoft.icon "access plus 1 months" -# js may change a bit sometimes -ExpiresByType text/js "access plus 7 days" -ExpiresByType application/x-javascript "access plus 7 days" -ExpiresByType application/x-shockwave-flash "access plus 7 days" -AddOutputFilterByType DEFLATE application/x-font-woff application/font-woff application/vnd.ms-fontobject application/x-font-ttf image/svg+xml Options +FollowSymlinks @@ -31,17 +10,12 @@ Options -Indexes Deny from all - - Header set Access-Control-Allow-Origin "*" - - RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] - #RewriteRule ^([^?]*) /url/url.php?p=$1 [L,QSA] diff --git a/public_html/index.php b/public_html/index.php index c5f535c..651cb25 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -1,7 +1,16 @@ set('document', $document); // Custom registrations -include(DIR_SYSTEM."registrations.php"); +$engine->extraRegistrations(); // Front Controller $controller = new Front($registry); @@ -282,4 +293,3 @@ $controller->dispatch($action, new Action($not_found)); // Output $response->output(); -?> \ No newline at end of file