diff --git a/.htaccess b/.htaccess index e85ab7b5..caea0515 100644 --- a/.htaccess +++ b/.htaccess @@ -1,10 +1,14 @@ AddDefaultCharset UTF-8 -RewriteEngine on - +# Remove the trailing slash from URL DirectorySlash Off -RewriteCond %{REQUEST_FILENAME} !-f -#RewriteCond %{REQUEST_FILENAME} !-d +# Enable rewrite rules +RewriteEngine on +# Deny direct access to .txt files +RewriteRule ^content/(.*)\.txt$ - [R=404,L] + +# All URL process by index.php +RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*) index.php [L] \ No newline at end of file diff --git a/admin/controllers/edit-page.php b/admin/controllers/edit-page.php index 9711c638..960d028c 100644 --- a/admin/controllers/edit-page.php +++ b/admin/controllers/edit-page.php @@ -26,7 +26,7 @@ function editPage($args) $dbPages->regenerate(); Alert::set('The page has been saved successfully'); - Redirect::page('admin', 'manage-pages'); + Redirect::page('admin', 'edit-page/'.$args['key']); } else { diff --git a/admin/views/edit-page.php b/admin/views/edit-page.php index 2d48202d..59d03513 100644 --- a/admin/views/edit-page.php +++ b/admin/views/edit-page.php @@ -53,7 +53,7 @@ + +