added gateway code so sites can exist at /somepath and not just at /
This commit is contained in:
parent
39b949e9f3
commit
c3acc50381
11 changed files with 64 additions and 45 deletions
|
|
@ -784,7 +784,7 @@ Returns the not found object. The not found object is set in the settings.
|
|||
=cut
|
||||
|
||||
sub getNotFound {
|
||||
if ($session{wguri} eq "/*give-credit-where-credit-is-due*") {
|
||||
if ($session{requestedUrl} eq "*give-credit-where-credit-is-due*") {
|
||||
my $content = "";
|
||||
open(FILE,"<".$session{config}{webguiRoot}."/docs/credits.txt");
|
||||
while (<FILE>) {
|
||||
|
|
@ -795,7 +795,7 @@ sub getNotFound {
|
|||
className=>"WebGUI::Asset::Snippet",
|
||||
snippet=> '<pre>'.$content.'</pre>'
|
||||
});
|
||||
} elsif ($session{wguri} eq "/abcdefghijklmnopqrstuvwxyz") {
|
||||
} elsif ($session{requestedUrl} eq "abcdefghijklmnopqrstuvwxyz") {
|
||||
return WebGUI::Asset->newByPropertyHashRef({
|
||||
className=>"WebGUI::Asset::Snippet",
|
||||
snippet=>q|<div style="width: 600px; padding: 200px;">Why would you type in this URL? Really. What were you expecting to see here? You really need to get a life. Are you still here? Seriously, you need to go do something else. I think your boss is calling.</div>|
|
||||
|
|
@ -1101,7 +1101,7 @@ A specific revision to instanciate. By default we instanciate the newest publish
|
|||
|
||||
sub newByUrl {
|
||||
my $class = shift;
|
||||
my $url = shift || $session{wguri};
|
||||
my $url = shift || $session{requestedUrl};
|
||||
my $revisionDate = shift;
|
||||
$url = lc($url);
|
||||
$url =~ s/\/$//;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue