0

I have a large set of URLs (over 1000) which need to be tested against a complex .htaccess file of redirect rules.

I have used the online htaccess tester to test individual redirects and fine-tune my set of rules, however, it is too laborious to test each url.

I also found a number of answers here but which does not really address batch testing.

Aurovrata
  • 2,000
  • 27
  • 45

1 Answers1

0

In order to solve the batch testing I have written a bash script file that leverages the api exposed by the online htaccess tester. The script makes use of curl and jq to test a file of URLs and outputs a CSV formatted line for each URL with the line number and rule that was matched in the htaccess file along with the redirected URL. This makes it very useful to build a spreadsheet of urls and their redirects and pinpoint which ones are failing.

Aurovrata
  • 2,000
  • 27
  • 45