On Sep 11, 2008, at 11:14 AM, Justin Pasher wrote:
Jason Pruim wrote:On Sep 11, 2008, at 7:30 AM, Eric Covener wrote:On Thu, Sep 11, 2008 at 6:28 AM, Jason Pruim <japruim@xxxxxxxxxx> wrote:Here is my .htaccess file... Does it look right? Options +FollowSymlinks RewriteEngine on RewriteLog /var/log/purl.virt.rewrite.logis this valdi in .htaccess?My guess is no since it's not working...Log directives cannot be used in .htaccess files (it could be a potential security hole to allow a user to specify their own logs, hammer the site with requests, then fill up a partition). Normally you would receive a 500 error code and a message in the apache error logging stating the directory is not allowed. You can, however, just leave it in the global/virtualhost apache config.RewriteLogLevel 9where's RewriteBase?I thought that rewritebase was optional?It is optional. It all depends on your setup/usage as to whether you need to use it.RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /p.php [L]RewriteCond %{REQUEST_FILENAME} !-fYou're not capturing or passing anything, and how do you get to mail.php?after you load purl.schreurprinting.com/jasonpruim112 there will be a link to http://purl.schreurprinting.com/mail.php?purl=jasonpruim112The basic premise I have been working off of is just simply if the file exists, let that file handle serving the page, if it DOESN"T exist pass it to p.php to handle it.So with that understanding I don't think that I need to capture anything in the rewritecond's other then if the file exists correct?You shouldn't have to worry about capturing any query string since you are performing an internal rewrite (the URL stays the same for the user). Referring back to your other email (which I mistakenly nuked already)...--------------------That is odd.... I moved the rewrite rules to a .htaccess file and now the real links work right, but the false links don't go into my handeler script... in other words http://purl.schreurprinting.com/mail.php?purl=jasonpruim112 works but http://purl.schreurprinting.com/jasonpruim112 does NOT...Here is my .htaccess file... Does it look right? Options +FollowSymlinks RewriteEngine on RewriteLog /var/log/purl.virt.rewrite.log RewriteLogLevel 9 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /p.php [L] --------------------So there is no file/directory called jasonpruim112 <http://purl.schreurprinting.com/jasonpruim112 >, correct? I copied your .htaccess file (removing the RewriteLog* references) and it correctly rewrites the URL request for / jasonpruim112 <http://purl.schreurprinting.com/jasonpruim112> to p.php. Is this not what you are seeing?
Hey Justin,You are correct that jasonpruim112 does not exist but is linked in a database... Although, I did some searching on the net and fighting with my config files and noticed that AllowOverides was set to none rather then all....
Once I made that switch both the main link, and the internal links all started working properly.
Sometimes I hate how picky computers can be hehehe. -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 11287 James St Holland, MI 49424 www.raoset.com japruim@xxxxxxxxxx --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx