summaryrefslogtreecommitdiff
path: root/src/master.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/master.cpp')
-rw-r--r--src/master.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/master.cpp b/src/master.cpp
index 0699051..086ebe3 100644
--- a/src/master.cpp
+++ b/src/master.cpp
@@ -2,6 +2,7 @@
#include "strusCms.hpp"
#include <cppcms/service.h>
+#include <cppcms/url_dispatcher.h>
namespace apps {
@@ -25,4 +26,17 @@ void master::ini( content::master &c )
c._root = cms.root( );
}
+void master::register_common_pages( )
+{
+ cms.dispatcher( ).assign( ".*", &master::not_found_404, this );
+}
+
+void master::not_found_404( )
+{
+ content::master c;
+ ini( c );
+ c.url = cms.request( ).script_name( ) + "/" + cms.request( ).path_info( );
+ render( "not_found_404", c );
+}
+
}