diff options
Diffstat (limited to 'index.cgi')
-rwxr-xr-x | index.cgi | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1,14 +1,15 @@ #!/usr/bin/perl -wT +$request = 'main'; # breaks up a string according to a separator -@uri = split('/', $ENV{REQUEST_URI}); -if ( $#uri > -1 && -e "/openwcms/data/$uri[1].html" ) +if(defined($ENV{REQUEST_URI})) { - $request = "$uri[1]"; -} -else -{ - $request = 'main'; + @uri = split('/', $ENV{REQUEST_URI}); + + if( $#uri > -1 && -e "/openwcms/data/$uri[1].html" ) + { + $request = "$uri[1]"; + } } require '/openwcms/add_items.pl'; |