-
mod_rewrite, cataching exceptions
Posted on May 26th, 2009 No commentsIs there a better way to structure these rewrite rules?
RewriteEngine On
RewriteRule ^users$ users_overview.php
RewriteRule ^users/$ users_overview.php
RewriteRule ^users/[0-9]?$ users_overview.php?customer=$1 [NC,L]
RewriteRule ^users/([^/\.]+)/?$ users_overview.php?customer=$1 [NC,L]
RewriteRule ^users/([^/\.]+)/([^/\.]+)?$ users_overview.php?customer=$1&pageno=$2 [NC,L]
RewriteRule ^users/([^/\.]+)/([^/\.]+)/?$ users_overview.php?customer=$1&pageno=$2 [NC,L]Try this:
RewriteEngine On
RewriteRule ^users/?$ users_overview.php
RewriteRule ^users/([^/\.]+)/?$ users_overview.php?customer=$1 [NC,L]
RewriteRule ^users/([^/\.]+)/(([^/\.]+)/?)?$ users_overview.php?customer=$1&pageno=$3 [NC,L] -
How to dynamically generate download links, which can only be accessed from an email
Posted on May 26th, 2009 No commentsI’m planning on distributing my software by providing a download link.
I would like to do it in a such way that only registered customers can access that link.
This is a typical process flow:
1) A potential user enters their name and email information via a Web page
2) A download link is being send to the email address, specified by the user
3) When the user receives an email from the Web site they click on the embedded download link and being directed to the download Web page, which, otherwise, is not directly accessible.How is this done (assuming Apache2)
-Eugene
Many ways to skin the cat on this
1st Way - Have them enter their userid and email with registration, once paid, I genenerated a unique key and sent it to them via email link with url and added the key as a paramenter. They then received the email, clicked it and downloaded application, and once it was downloaded, my download application would then delete the key I sent them. Then if they needed another copy, they would hit the page again, reverify themselves, and I send it again with the url and a different unique key.
2nd Way - Just have a generic link. Adjust your software for them to enter the registration key to active. This way you can give trial periods and then shut if off if they dont have the real registration key. I also put the key into the registry and would check for it on the trial period so they just didnt keep downloading over and over trial versions.
Depends on how stict you want this… otherwise dont supply a key and just have them download the software and then have your software smart enough for them to enter their unique key.
-
The proxy server received an invalid response from an upstream server Bad Gateway ?
Posted on May 26th, 2009 No commentsHi Experts,
I need urgent help…………………Pl
Bad Gateway
The proxy server received an invalid response from an upstream server.——————————————————————————–
Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.7a Server at hqidlhrwwb02.hqh.intra.aexp.com Port 443
Please delete this question.
I got the resolution. We had to bounce back the application server. though we were recyclying the services the services were coming up fine but still the browser will prodeuce the Bad Gateway error.
Thanks for the input experts.
-
how can we setup a password protected Apache Server in redhat 5
Posted on May 26th, 2009 No commentshow can we setup a password protected Apache Server in redhat 5
I have created two files .htaccess and .htpasswd
setting of .htaccess file
AuthName “resticted stuff”
AuthType Basic
AllowOverride AuthConfig
AuthUserFile /etc/httpd/conf/.htpasswd
require valid-userI have created .htpassed file by using this command
#chown apache:apache /etc/httpd/conf/.htpasswd
# chmod 0660 /etc/httpd/conf/.htpasswd
#htpasswd -c /home/secure/apasswords userNow, i don’t know where i should have to make an entry of .htaccess file.
in httpd.conf file.Hi,
create .htaccess file to the web directory for which you want restricted access. eg
/var/www/mysite/content of .htaccess file
AuthName “resticted stuff”
AuthType Basic
AllowOverride AuthConfig
AuthUserFile /etc/httpd/conf/.htpasswd
require valid-userand then
add users to your .htpasswd file using
#htpasswd -c /etc/httpd/conf/.htpasswd# chown apache:apache /etc/httpd/conf/.htpasswd
# chmod 0660 /etc/httpd/conf/.htpasswdthen restart your httpd service
-
Apache Userdir_mod functionality in Windows
Posted on May 26th, 2009 No commentsI am looking for a way to bring the ~username functionality in Apache into a WIndows 2008 environment. We are currently migrating from EDirectory to Windows, my boss wants users to still have the ~username functionality to present a public web folder. I have installed APache 2.2 on a windows 2008 server. I have a domain user running apache, I am having trouble mounting the UNC share of the file server. My service user can mount the share and see the files, but I can’t access the files in a web browser. Is what I am doing possible? How does apache determine where the user’s dir is?
> How does apache determine where the user’s dir is?
There’s a system env to the user directory which should contain the value C:/Documents and Settings/. The path to the user dir should be C:/Documents and Settings/ + username + path specified by the UserDir directive
like
UserDir “My Documents/public_html”
Order deny,allow
Allow from all




Recent Comments