Jump to content

using .htaccess redirect pdf file to signup page? Is it possible?


camball

Recommended Posts

Hello, I am a newbie to .htaccess and I have a question if something is possible. I have tried to look this up but I have not found anything.

 

The site im working on had quite a few pdf files that people are looking for. Many people find them through search engines and download them.

 

When people want to view these pdf files, I want to send them to a page where they submit their email, area code and name. After that they can get access to the pdf file. Is this possible?

 

Also can I make it so some web search spiders can still see the pdf files with SetEnvIfNoCase?

 

Thanks in advance for your help

Not sure if you need to do this with .htaccess, but you can setup a PHP page with a form allowing for input of your variables and would execute like so:

[*]Post your variables, entering them into a database table

[*]Upon sucessful post/validation of the text, redirect the user to the PDF via

<? header(location: mypdf.pdf); ?>

 

Hope this helps!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.