# Redirect the all users to maintenance.html during live migration
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/maintenance.html$ [NC]
RewriteRule ^(.*)$ /maintenance.html [R=302,L]
### DISBALED DURING LIVE MIGRATION ###
# every other rewrite/redirect fails (e.g. in an aliased environment without
# mod_rewrite). Additionally, this reduces the matching process for the
# start page (path "/") because otherwise Apache will apply the rewriting rules
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
DirectoryIndex app.php
# By default, Apache does not evaluate symbolic links if you did not enable this
# feature in your server configuration. Uncomment the following line if you
# install assets as symlinks or if you experience problems related to symlinks
# when compiling LESS/Sass/CoffeScript assets.
# Options FollowSymlinks
# Disabling MultiViews prevents unwanted negotiation, e.g. "/app" should not resolve
# to the front controller "/app.php" but be rewritten to "/app.php/app".
Options -MultiViews
RewriteEngine On
# Redirect a user to /banned.html based on their IP address.
RewriteCond %{REMOTE_ADDR} ^217\.35\.74\.160$ [OR] # imported from v7
RewriteCond %{REMOTE_ADDR} ^83\.223\.97\.142$ [OR] # imported from v7
RewriteCond %{REMOTE_ADDR} ^88\.109\.160\.98$ [OR] # imported from v7
RewriteCond %{REMOTE_ADDR} ^88\.111\.233\.171$ [OR] # imported from v7
RewriteCond %{REMOTE_ADDR} ^88\.111\.240\.146$ [OR] # imported from v7
RewriteCond %{REMOTE_ADDR} ^67\.159\.5\.246$ [OR] # imported from v7
RewriteCond %{REMOTE_ADDR} ^65\.57\.106\.15$ [OR] # imported from v7
RewriteCond %{REMOTE_ADDR} ^88\.104\.108\.36$ [OR] # imported from v7
RewriteCond %{REMOTE_ADDR} ^88\.104\.107\.163$ [OR] # imported from v7
RewriteCond %{REMOTE_ADDR} ^83\.244\.213\.130$ [OR] # crnemployment spamming 25/03/2011
RewriteCond %{REMOTE_ADDR} ^188\.94\.18\.154$ [OR] # evolutionjobs, Emily Taylor, calling clients inc RedAnt 03/08/2011
RewriteCond %{REMOTE_ADDR} ^188\.94\.18\.155$ [OR] # evolutionjobs, Emily Taylor, calling clients inc RedAnt 03/08/2011
RewriteCond %{REMOTE_ADDR} ^188\.94\.18\.58$ [OR] # evolutionjobs, Emily Taylor, calling clients inc RedAnt 03/08/2011
RewriteCond %{REMOTE_ADDR} ^91\.201\.64\.4$ [OR] # sending nonsense as new advertiser/job
RewriteCond %{REMOTE_ADDR} ^176\.31\.249\.210$ [OR] # mass impressions on job details page for jobs as they go live 23/05/2012
RewriteCond %{REMOTE_ADDR} ^46\.105\.99\.166$ [OR] # mass impressions on job details page for jobs as they go live 23/05/2012
RewriteCond %{REMOTE_ADDR} ^46\.105\.127\.204$ [OR] # mass impressions on job details page for jobs as they go live 23/05/2012
RewriteCond %{REMOTE_ADDR} ^85\.25\.7\.12$ [OR] # mass impressions on job details page for jobs as they go live 23/05/2012
RewriteCond %{REMOTE_ADDR} ^164\.177\.159\.97$ [OR] # mass impressions on job details page for jobs as they go live 23/05/2012
RewriteCond %{REMOTE_ADDR} ^85\.214\.49\.208$ [OR] # mass impressions on job details page for jobs as they go live 18/06/2012
RewriteCond %{REMOTE_ADDR} ^92\.236\.212\.131$ [OR] # Tom Gallagher tom-gallagher2010
RewriteCond %{REMOTE_ADDR} ^80\.88\.211\.2$ [OR] # JobsByCV (mail.jobsbycv.co.uk) copying all business jobs to their site. Ben at Orbital confirms its Simon Byers in Maidstone. 09/07/2012
RewriteCond %{REMOTE_ADDR} ^81\.141\.245\.73$ [OR] # Mr Shoveit UpMyArsehole applying to an Merridian Business Support ad
RewriteCond %{REMOTE_ADDR} ^111\.118\.187\.13$ [OR] # 1,974 injection attempts through jobsinkent.com jobseeker feedback form
RewriteCond %{REMOTE_ADDR} ^82\.71\.233\.211$ [OR] # Rob at pro-quest.co.uk offering to supply CVs to clients
RewriteCond %{REMOTE_ADDR} ^24\.247\.204\.173$ [OR] # Error log showing lots of folder index attmpts and possible character encoding hack attempt 04/11/2013
RewriteCond %{REMOTE_ADDR} ^79\.170\.44\.204$ [OR] # Carole at RecruitmentSelection marketing to clients inc Chris at Gallagher 13/02/2014
RewriteCond %{REMOTE_ADDR} ^80\.177\.94\.33$ [OR] # First Recruitment Services, Kimberley emailed us regarding our job on our site 18/02/2012
RewriteCond %{REMOTE_ADDR} ^72\.232\.204\.170$ [OR] # Harrison Barnes at Employment Crossing emailing advertisers that they can better our service 10/04/2014
RewriteCond %{REMOTE_ADDR} ^87\.242\.234\.159$ [OR] # turfjobs.co.uk, emailing advertisers
RewriteCond %{REMOTE_ADDR} ^10\.236\.135\.197$ [OR] # rebecca drew from sevenacorns.co.uk spamming advertisers
RewriteCond %{REMOTE_ADDR} ^92\.27\.19\.141$ [OR] # Sales Team Recruitment spamming clients
RewriteCond %{REMOTE_ADDR} ^80\.82\.247\.140$ [OR] # Noreen at Eireann Personnel emailing clients. 11/07/2014
RewriteCond %{REMOTE_ADDR} ^79\.160\.143\.6$ [OR] # jobseeker sending abusive application to red eagle job id 574577 01/08/2014
RewriteCond %{REMOTE_ADDR} ^109\.6\.115\.38$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^122\.131\.186\.5$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^178\.40\.200\.216$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^186\.137\.11\.89$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^189\.181\.246\.184$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^190\.215\.143\.63$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^212\.93\.105\.158$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^24\.138\.154\.170$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^77\.159\.9\.24$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^78\.180\.94\.165$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^81\.164\.225\.161$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^83\.4\.211\.236$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^84\.250\.105\.224$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^85\.206\.129\.63$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^88\.85\.38\.74$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^89\.75\.144\.123$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^90\.182\.78\.200$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^93\.87\.134\.188$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^96\.23\.167\.158$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^99\.229\.159\.57$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^99\.248\.143\.139$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^93\.87\.134\.188$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^96\.23\.167\.158$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^99\.229\.159\.57$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^99\.248\.143\.139$ [OR] # johnsmith@exmaple.com applicant attemted injection 01/12/2014
RewriteCond %{REMOTE_ADDR} ^195\.99\.210\.162$ [OR] # Katarzyna dobrylko kasiunia.dob@wp.pl mass applications 06/06/2016
RewriteCond %{REMOTE_ADDR} ^2\.27\.40\.141$ [OR] # Abusive application to jobId 797046 23/08/2016
RewriteCond %{REMOTE_ADDR} ^217\.42\.212\.252$ [OR] # Abusive/multiple applications to Claire @ RSFL 06/12/2016
RewriteCond %{REMOTE_ADDR} ^2\.29\.37\.188$ [OR] # Surname "Dingle" multiple applications and not answering phone to recuriters (change IP regularly) 12/06/2017
RewriteCond %{REMOTE_ADDR} ^109\.146\.2\.105$ [OR] # Abusive application to jobId 943795 11/10/2017
RewriteCond %{REMOTE_ADDR} ^92\.207\.107\.151$ [OR] # Misuse of webchat & constant trawling of site - CP
RewriteCond %{REMOTE_ADDR} ^82\.132\.224\.65$ [OR] # Misuse of webchat & constant trawling of site - CP
RewriteCond %{REMOTE_ADDR} ^82\.132\.225\.78$ [OR] # JobsByCV
RewriteCond %{REMOTE_ADDR} ^217\.36\.217\.13$ [OR] # JobsByCV
RewriteCond %{REMOTE_ADDR} ^127\.0\.0\.2$
RewriteCond %{REQUEST_URI} !banned\.html$
RewriteCond %{REQUEST_URI} !\.(js|png|gif|jpg|css)$
RewriteRule ^ /banned.html [R=302,L]
# Only allow access to /admin & /api if we're on the jiksoftware.ltd.uk domain.
RewriteCond %{HTTP_HOST} !\.jiksoftware\.ltd\.uk
RewriteCond %{REQUEST_URI} ^/admin [OR]
RewriteCond %{REQUEST_URI} ^/api
RewriteRule .* / [R=301,L]
# Require the www. subdomain.
RewriteCond %{HTTP_HOST} !^v10\. [NC]
RewriteCond %{HTTP_HOST} !^employers\. [NC]
RewriteCond %{HTTP_HOST} !^dev\. [NC]
RewriteCond %{HTTP_HOST} !^admin\. [NC]
RewriteCond %{HTTP_HOST} !^api\. [NC]
RewriteCond %{HTTP_HOST} !^api1\. [NC]
RewriteCond %{HTTP_HOST} !^beta\. [NC]
RewriteCond %{HTTP_HOST} !^local\. [NC]
RewriteCond %{HTTP_HOST} !^www1\. [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule .* http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
## REDIRECT COMING SOON SITES
# RewriteCond %{HTTP_HOST} jobsinhampshire\.com
# RewriteCond %{REQUEST_URI} ^/employers
# RewriteRule (.*) /launch/employers [R=302,L]
# RewriteCond %{HTTP_HOST} jobsinhampshire\.com
# RewriteCond %{REQUEST_URI} ^(/|/launch/jobseekers)$
# RewriteRule (.*) /home [R=302,L]
# RewriteCond %{HTTP_HOST} !jobsinhampshire\.com
# RewriteCond %{REQUEST_URI} ^(/jobseekers/cvhealthcheck|/jobseekers/cv_report|/launch/jobseekers|/home)$
# RewriteRule (.*) / [R=302,L]
## REDIRECT OBSOLETE BROWSERS
RewriteCond %{HTTP_HOST} !^api\.jiksoftware\.ltd\.uk
RewriteCond %{HTTP_USER_AGENT} MSIE\ [1-8] [NC]
RewriteCond %{REQUEST_URI} !(/browser-not-supported|/css/|/images/|/js/|/favicon|/app.php|/app_dev.php)
RewriteRule (.*) /browser-not-supported [L,R=302]
RewriteCond %{HTTP_USER_AGENT} !MSIE\ [1-8] [NC]
RewriteCond %{REQUEST_URI} browser-not-supported
RewriteRule (.*) / [R=302]
# Redirect job URLs with slugs.
RewriteRule ^job/([0-9]+)/([0-9A-Za-z_-]+).html$ /job/$1 [R=301,L]
RewriteRule ^browse/jobs_in_office_administration.html$ /browse/jobs_in_administration.html [R=301,L]
RewriteRule ^browse/jobs_in_southendonsea.html$ /browse/jobs_in_southend-on-sea.html [R=301,L]
RewriteRule ^browse/jobs_in_parttime.html$ /browse/jobs_in_part-time.html [R=301,L]
# Mobile Sub-Domain Redirect
# RewriteCond %{HTTP_HOST} ^m\.jobsin([a-z]+)\.com
# RewriteRule ^$ http://www.jobsin%1.com/mobile/home.html [R=301,NC,L]
# V9 Redirects
RewriteRule ^employers/login.html$ /employers [R=301,L]
##### DEFAULT SYMFONY STUFF AND WHAT NOTT COMES NEXT ... DO NOT EDIT BELOW THIS LINE.
# Determine the RewriteBase automatically and set it as environment variable.
# If you are using Apache aliases to do mass virtual hosting or installed the
# project in a subdirectory, the base path will be prepended to allow proper
# resolution of the app.php file and to redirect to the correct URI. It will
# work in environments without path prefix as well, providing a safe, one-size
# fits all solution. But as you do not need it in this case, you can comment
# the following 2 lines to eliminate the overhead.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
# Sets the HTTP_AUTHORIZATION header removed by apache
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect to URI without front controller to prevent duplicate content
# (with and without `/app.php`). Only do this redirect on the initial
# rewrite by Apache and not on subsequent cycles. Otherwise we would get an
# endless redirect loop (request -> rewrite to front controller ->
# redirect -> request -> ...).
# So in case you get a "too many redirects" error or you always get redirected
# to the start page because your Apache does not expose the REDIRECT_STATUS
# environment variable, you have 2 choices:
# - disable this feature by commenting the following 2 lines or
# - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
# following RewriteCond (best solution)
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
# If the requested filename exists, simply serve it.
# We only want to let Apache serve files and not directories.
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
# Rewrite all other queries to the front controller.
RewriteRule .? %{ENV:BASE}/app.php [L]
# When mod_rewrite is not available, we instruct a temporary redirect of
# the start page to the front controller explicitly so that the website
# and the generated links can still be used.
RedirectMatch 302 ^/$ /app.php/
# RedirectTemp cannot be used instead
#### Gzip Files ####
AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
AddOutputFilterByType DEFLATE font/truetype font/opentype
### DISABLED CONTENT ENDS ###