Options -Indexes
RewriteEngine On

# Block scraping tools
RewriteCond %{HTTP_USER_AGENT} ^Wget [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^HTTrack [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^curl [NC]
RewriteRule .* - [F,L]



RewriteRule ^details/([a-zA-Z0-9_-]+) product-details.php?pid=$1 [L,QSA]
RewriteRule ^view-details/([a-zA-Z0-9_-]+) appliers-details.php?applied_by=$1 [L,QSA]
RewriteRule ^detail/([a-zA-Z0-9_-]+) view-vacancy.php?post_Id=$1 [L,QSA]
RewriteRule ^app/([0-9]+)/([0-9]+)/?$ applicant-details.php?user_id=$1&post_Id=$2 [L,QSA]

RewriteRule ^sub-admin/([a-zA-Z0-9_-]+) manage-subadmin-details.php?id=$1 [L,QSA]
RewriteRule ^users/([a-zA-Z0-9_-]+) user_details.php?user_id=$1 [L,QSA]
RewriteRule ^applicants-directory/?$ user.php [L] 
RewriteRule ^template/?$ template-details.php [L] 



ErrorDocument 404 /recruitment-portal/webcontrol/404.php
RewriteCond %{HTTP_HOST} capinta\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.capinta.com/app/$1 [R,L]
