Vivek Narula
Vivek Narula

Reputation: 515

SetEnv in htaccess applying to internal folder

I am working on a website having Apache as webserver, using PHP. There are an folder in public_html by the name of "teacher". The .htaccess file in public_html file has this line

SetEnvIf Request_URI "\.pdf$" requested_pdf=pdf
Header add Content-Disposition "attachment" env=requested_pdf

now as expected these are also applying in "teacher" folder which i don't want to do. I tried by adding an blank .htaccess file in "teacher" folder so that it pick this htaccess, however it is not working.

I tried to search but didn't fine anything relevant as per my knowledge. So can anyone help me out so that these set headers does not apply to "teacher" folder.

Thanks in Advance.

Upvotes: 1

Views: 267

Answers (1)

anubhava
anubhava

Reputation: 785276

Place this value in teacher/.htaccess:

Header unset Content-Disposition

Upvotes: 1

Related Questions