Helpful Information
 
 
Category: System Administration
.htaccess for page redirect

Hello,
I'll be working on a page (cgi based page) and I don't want users to access the page when I'll be working on it.
I was wandering, because I once read that I can redirect an user using .htaccess, but I don't remember.

For example the page that I'll be working is: www.domain.com/cgi-bin/folder/document.pl (http://www.domain.com/cgi-bin/folder/document.pl)
(it also can be www.domain.com/cgi-bin/folder/document.pl?anything=somethin&something=anything) (http://www.domain.com/cgi-bin/folder/document.pl?anything=somethin&something=anything))

And I want to redirect them to: www.domain.com/untercontruction.html (http://www.domain.com/untercontruction.html)

If any one can help me on this, I'll be very grateful

Merry Christmas

Couldn't you just make and index-file that redirects? Or does your work have to be named index.*?
Steffen

Actually I need to specify the file that I want that when people try access it, it redirects them to the temporary file.
Because most people enter to the file directly.

Be ready for someting stupid but simple:

Make your file to say -

"if no id ->redirect to the url
else ->
print the page"

Then your new files has a wrong link:

index.pl?ID=Pusloroker

which has to be changed. But here you can use Arachnophilia (my favoriteprogram in this case) to make the changes.
I know it sounds stupid doing it this way, but it works.

Two times before!, have I changed 300 pages in that way (before I started with php!) using Arachnophilia, and it took less than 5 minutes on my K6-300 with 96Mb memory and a slow harddisk. Which is the reason for me, to make this stupid suggesting http://www.devshed.com/Talk/Forums/redface.gif)

But anyway, I also remember something about having access file to redirect, but I can't find it again.
Steffen

>>I need to specify the file that I want that when people try access it

Start here -> http://httpd.apache.org/docs/mod/core.html#locationmatch (if you have write access to httpd.conf)

If you don't, then start here -> http://httpd.apache.org/docs/mod/core.html#filesmatch










privacy (GDPR)