#include <Wt/WApplication>
#include "Home.h"
Go to the source code of this file.
Definition at line 170 of file WtHome.C.
175 const std::string *historyKey = env.
getParameter(
"historyKey");
178 const char *mainStr[]
181 "main:2",
"/features",
182 "main:4",
"/examples",
183 "main:3",
"/documentation",
184 "main:5",
"/download",
185 "main:6",
"/community" };
187 const char *exampleStr[]
188 = {
"example:0",
"/examples",
189 "example:1",
"/examples/charts",
190 "example:2",
"/examples/wt-homepage",
191 "example:3",
"/examples/treelist",
192 "example:4",
"/examples/hangman",
193 "example:5",
"/examples/chat",
194 "example:6",
"/examples/mail-composer",
195 "example:7",
"/examples/drag-and-drop",
196 "example:8",
"/examples/file-explorer",
197 "example:9",
"/examples/calendar" };
199 if (historyKey->find(
"main:4") != std::string::npos) {
200 for (
unsigned i = 0; i < 10; ++i)
201 if (historyKey->find(exampleStr[i*2]) != std::string::npos) {
203 app->
log(
"notice") <<
"redirecting old style URL '"
204 << *historyKey <<
"' to internal path: '"
205 << exampleStr[i*2+1] <<
"'";
211 for (
unsigned i = 0; i < 6; ++i)
212 if (historyKey->find(mainStr[i*2]) != std::string::npos) {
215 app->
log(
"notice") <<
"redirecting old style URL '"
216 << *historyKey <<
"' to internal path: '"
217 << mainStr[i*2+1] <<
"'";