0

I had a script that ran weather update urls in /weather which is now deleted

These types of urls are 404'ed and need to be redirected to /index.php as I show below

www.atlanticcity.com/weather/index.php?config=&forecast=pass&pass=local_radar&dpp=1&radar_icao=karx&hwvradartype=comp&place=wisconsin+rapids&state=wi&zipcode=&country=us&county=55141&zone=WIZ035

This I tried and doesnt work....

RewriteRule ^weather/(.*)  http://www.atlanticcity.com [R=301,L]
Jon Lin
  • 142,182
  • 29
  • 220
  • 220
dave
  • 5
  • 3
  • possible duplicate of [Tips for debugging .htaccess rewrite rules](http://stackoverflow.com/questions/9153262/tips-for-debugging-htaccess-rewrite-rules) – Phil Tune Dec 10 '14 at 17:47
  • Hi Phil- thanks for pointing that out. Looked there yesterday and tried stuff. – dave Dec 10 '14 at 17:50
  • Do you have other rules? is `/weather` a directory? – Jon Lin Dec 10 '14 at 17:53
  • I have a huge htaccess file since the site was redone recently. /weather does not exist anymore, but it was a directly – dave Dec 10 '14 at 18:20
  • Make sure to place that redirect rule as very first rule in your .htaccess – anubhava Dec 10 '14 at 18:33

1 Answers1

0

You could use a redirect rule instead of rewrite. This would have to go in the apache .conf file under the virtual hosts tag.

Redirect 302 /weather/.* http://www.atlanticcity.com/index.php
bigC5012
  • 589
  • 1
  • 5
  • 19