Friday, 15 August 2014

apache - Rewrite one main page to 404 but not other ones -


I have the following three rewriting rules that tell users based on payment forms, which users are those that work fine Do:

  RewriteRule ^ / marketing / employees $ https://www.example.com/marketing/payroll/forms/salary-payment-form.shtml?stafftype=EXAMPLE [R, L] RewriteRule ^ / marketing / other staff $ https://www.example.com/marketing/payroll/forms/salary-payment-form.shtml?stafftype=HR [R, L] RewriteRule ^ / marketing / other2- employees $ Https: //www.example.com/marketing/payroll/forms/salary-payment-form.shtml? Stafftype = EXAMPLE \ Commercial \ Ltd [R, L]  

I have a rule so that if someone goes to the main URL, they will get only 404 - I can add the URL given below. Have tried, but is not working:

  RewriteCond% {REQUEST_URI} ^ / marketing / payroll /forms/salary-payment-form.shtml$ RewriteRule ^ / marketing / payroll / forms / Salary payment non-form.shtml $ - [R = 404, L]  

When I put it all above 404 is getting the URL - how can I restrict it So that just above Security main URL 404 gives and does not redirect to specific pages? Try

% {REQUEST_URI} (% {QUERY_STRING} ):

  RewriteCond % {QUERY_STRING} ^ $ RewriteRule ^ / Marketing / Payroll / Forms / Salary Payments Non-form.shtml $ - [R = 404, L]  

No comments:

Post a Comment