jdMorgan

msg:1523406 | 8:10 pm on Apr 7, 2005 (gmt 0) |
You may need to add the directive
Options +FollowSymLinks
to your .htaccess file. Or add FollowSymLinks to the list of Options in httpd.conf. Check your server error log -- It will tell you if this is the problem. Jim
|
neiljones

msg:1523407 | 9:09 pm on Apr 7, 2005 (gmt 0) |
I have tried the options statement in the .htaccess this is to no avail. The error_log shows just the message File Does not Exist: an identical error message is appearing in the logs for pages in other as yet uncreated directories which were on the site bevore it was moved. It is almost as if mod-rewrite is not switched on. I am baffled.
|
jdMorgan

msg:1523408 | 5:03 pm on Apr 8, 2005 (gmt 0) |
In the error log, which file does it say does not exist -- old.html or new.html? Also, it should give a full path to the file in that error line. Does the path look correct? The requirements for mod_rewrite are: Rewrite module loaded AllowOverride directive specifying FileInfo and Options, or All Options FollowSymLinks or SymLinksIfOwnerMatch enabled Valid rewrite code in httpd.conf or .htaccess file It seems you've satisfied all requirements, so I'm baffled, too. If a directory is aliased, then control for that directory is 'diverted' before your web-root .htaccess file can have any effect. This often causes problems when people try to invoke rewrites intended to affect the cgi-bin directory, which is usually aliased for security reasons. You didn't mention cgi-bin, so this is not likely to be the problem, but I thought I should mention it. Jim
|
neiljones

msg:1523409 | 5:50 pm on Apr 8, 2005 (gmt 0) |
Thanks Jim In the error log it is old.html that does not exist accessing new.html directly works. the error path for old.html is the filepath of the actual file on the server which is correct. The httpd.conf requirements you mention are what is set. I am using VirtualDocumentRoot to host several domains on one ip. I have made a chang to the .htaccess RewriteEngine on RewriteRule ^old\.html$ new.html No effect I am not ising cgi-bin the idea is to use a php program to handle things when I have all of this enabled
|
jdMorgan

msg:1523410 | 2:31 am on Apr 9, 2005 (gmt 0) |
Just to verify: You are placing this code in .htaccess, and not in httpd.conf? Jim
|
neiljones

msg:1523411 | 12:38 pm on Apr 9, 2005 (gmt 0) |
It is in .htaccess I have however made some progress. I have discovered how to solve the problem PARTIALLY. My httpd.conf file is <apparently causing it not to> work. If I comment out the line that starts VirtualDocumentRoot and put the pages where the default DocumentRoot statement expects them to be, it works. However I need this to work with name based virtual hosting. [edited by: jdMorgan at 4:11 pm (utc) on April 9, 2005] [edit reason] Removed specifics per TOS. [/edit]
|
neiljones

msg:1523412 | 4:16 pm on Apr 9, 2005 (gmt 0) |
Eureka! After quite a bit more playing around this is the solution. <VirtualHost *:80> ServerAdmin postmaster@example.com DocumentRoot /path/path/example.com/ ServerName example.com ErrorLog /path/example.com-error_log CustomLog /path/example.com-access_log common RewriteLog /pathd_rewrite_log RewriteLogLevel 9 <Directory "/path/example.com"> Options Indexes FollowSymLinks ExecCGI Includes AllowOverride All </Directory> Options Indexes FollowSymLinks ExecCGI Includes </VirtualHost>
|
jdMorgan

msg:1523413 | 4:17 pm on Apr 9, 2005 (gmt 0) |
Ok, I just wanted to make sure, because the syntax varies slightly between httpd.conf and .htaccess, in that the URL seen by RewriteRule is "localized" to the directory where that Rule appears -- That is, the directory path above the current directory is stripped off, so a RewriteRule in /widgets/pages sees only /images/widget.gif if /widgets/pages/images/widget.gif is requested, whereas in httpd.conf, RewriteRule sees the entire /widgets/pages/images/widget.gif URL. I'm not very good at server setup, so hopefully someone else will come along who can help you with that issue. In the meantime, you might want to try experimenting with the UseCanonical name setting, as that's the only other thing I can think of that might cause trouble here. Jim
|
jdMorgan

msg:1523414 | 5:08 pm on Apr 9, 2005 (gmt 0) |
Cross-posted... Glad you got it working! And now that it does work, change the RewriteLogLevel 9 to log level 0, because it'll fill up your log with an awful lot of data and really bog down your server at that '9' setting. Jim
|
|