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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.