What I want is to get the request for the page to go through the script.. But I get "Page not found" for any .htm or .html file request. Although, seems like Rewrite directive is allowed ( error log stays the same) So, something wrong with that, but what??? Would be greatly appreciate for that! Thank you!
You don't really need the rewrite, the line in .htaccess to make a file named with a .htm extension be treated as a .cgi is as follows:
AddType application/x-httpd-cgi .htm
Now just name the script as the pagename-you-want.htm and it will execute. But some of this depends on how your script retrieves pages. Are they inline? i.e. is the HTML source code embedded in the script or does the script read the pages to display from a file? The example here is for a script with inline HTML source.
Thanks, Air. But they are not inline. I want the solution to cloak the site, although the pages are in usual files easy for updating. The script takes the file as the parameter .. Then checks for the IP. If that is the SE (Google), then it takes the same file from the directory /Google/. I mean, for example, you accessed the index.html file. That goes like /cgi-bin/cloak.pl?name=index.html The script checks the IP and takes the index.html from the right directory. It just Opens and prints the file.. Makes sense??? Would be greatly appreciate for that!