aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/httpd.conf3
-rw-r--r--perllib/FixMyStreet/Map.pm2
-rwxr-xr-xweb/index.cgi15
3 files changed, 15 insertions, 5 deletions
diff --git a/conf/httpd.conf b/conf/httpd.conf
index ad648a4a0..72993ee9a 100644
--- a/conf/httpd.conf
+++ b/conf/httpd.conf
@@ -43,6 +43,9 @@ RewriteEngine on
# RewriteLog /var/log/apache2/rewrite.log
# RewriteLogLevel 3
+# catch some Catalyst urls early as they are deep in the site
+RewriteRule /reports/new(.*) /fixmystreet_app_cgi.cgi [L]
+
# End slashes goodbye
RewriteRule ^/admin/ - [L]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm
index a9978103f..64cc38a2e 100644
--- a/perllib/FixMyStreet/Map.pm
+++ b/perllib/FixMyStreet/Map.pm
@@ -38,7 +38,7 @@ sub header {
my $cobrand = Page::get_cobrand($q);
my $cobrand_form_elements =
Cobrand::form_elements( $cobrand, 'mapForm', $q );
- my $form_action = Cobrand::url( $cobrand, '', $q );
+ my $form_action = Cobrand::url( $cobrand, '/reports/new', $q );
my $encoding = '';
$encoding = ' enctype="multipart/form-data"' if $type == 2;
my $pc = $q->param('pc') || '';
diff --git a/web/index.cgi b/web/index.cgi
index 8fab1d079..178706b20 100755
--- a/web/index.cgi
+++ b/web/index.cgi
@@ -936,10 +936,17 @@ sub display_location {
map { Utils::truncate_coordinate($_) } #
( $latitude, $longitude );
- my $url_skip = NewURL($q, -retain=>1, pc => undef,
- x => undef, 'y' => undef,
- latitude => $short_lat, longitude => $short_lon,
- 'submit_map'=>1, skipped=>1
+ my $url_skip = NewURL(
+ $q,
+ -url => '/reports/new',
+ -retain => 1,
+ pc => undef,
+ x => undef,
+ 'y' => undef,
+ latitude => $short_lat,
+ longitude => $short_lon,
+ 'submit_map' => 1,
+ skipped => 1
);
my $pc_h = ent($q->param('pc') || '');