I realize this is sort of a how to unDrupalize something request, but I'm hoping someone has the easy answer.
I've got a Drupal site:
I've installed PHPSurveyor in a subfolder:
http://kairosnews.org/surveyor/
However, I cannot access the admin page:
http://kairosnews.org/surveyor/admin/admin.php
I'm guessing that either (a) Drupal's .htaccess files directive might be blocking access or (b) Drupal assumes it's supposed to read that file. I know that it's not the file directives in .htaccess, for I tried my .htaccess file with all of those deleted. Still not working.
Thanks for any help :)
Charlie Lowe
Katin,
It was the rewrite directives:
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Once they were commented out, phpsurveyor seemed to work fine. 'Course I need them for my Drupal site :)
Note: once I was logged in, I could change the directives back and the phpsurveyor admin section continued to work. Seems strange.
Charlie
Hi,
I actually had a similar issue for my debian packages that I distribute. I had to add a small .htaccess to my debian directory to allow browsing
--8<-- Options +indexes <IfModule mod_rewrite.c> RewriteEngine on </IfModule> --8<--
You may only want to turn off the rewrite engine.
Gordon.
On Mon, 2005-08-29 at 21:35 -0500, Charlie Lowe wrote:
Katin,
It was the rewrite directives:
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Once they were commented out, phpsurveyor seemed to work fine. 'Course I need them for my Drupal site :)
Note: once I was logged in, I could change the directives back and the phpsurveyor admin section continued to work. Seems strange.
Charlie
Hello Charlie,
Monday, August 29, 2005, 7:35:27 PM, you wrote:
CL> It was the rewrite directives:
CL> RewriteCond %{REQUEST_FILENAME} !-f CL> RewriteCond %{REQUEST_FILENAME} !-d CL> RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
CL> Once they were commented out, phpsurveyor CL> seemed to work fine. 'Course I need them for CL> my Drupal site :)
CL> Note: once I was logged in, I could change the CL> directives back and the phpsurveyor admin CL> section continued to work. Seems strange.
Yes, it's definitely the rewrite directives. I also certainly don't want to disable the rewrite, as I've grown really fond of having slashes (/) instead of query strings that the search engines don't want to follow.
My site is at my document_root, and in the "main" (document_root) .htaccess file, here is what I added to bypass processing for sub-folders that are non-Drupal...
=========[ start of .htaccess snippet]========== <IfModule mod_rewrite.c> RewriteEngine on
#stuff to let through (ignore) RewriteCond %{REQUEST_URI} "favicon.ico" [OR] RewriteCond %{REQUEST_URI} "/rss/" [OR] RewriteCond %{REQUEST_URI} "/test/" RewriteRule (.*) $1 [L]
====================[ end ]=====================
For each folder you want to bypass, add an RewriteCond line, and end all but the final RewriteCond with [OR].
In my sample, I don't want Drupal URL processing for any requests of the favicon.ico file, my non-Drupal RSS feed engine contained in the /rss/ sub-folder, and any PHP testing I happen to be doing in the /test/ folder.
The [L] in the rewrite rule tells it to stop there and bypass the rest of the rewrite rules.
Hope this helps.
On Aug 31, 2005, at 6:25 PM, Gunther Herzog wrote:
Hello Charlie,
Monday, August 29, 2005, 7:35:27 PM, you wrote:
CL> It was the rewrite directives:
CL> RewriteCond %{REQUEST_FILENAME} !-f CL> RewriteCond %{REQUEST_FILENAME} !-d CL> RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
CL> Once they were commented out, phpsurveyor CL> seemed to work fine. 'Course I need them for CL> my Drupal site :)
CL> Note: once I was logged in, I could change the CL> directives back and the phpsurveyor admin CL> section continued to work. Seems strange.
Yes, it's definitely the rewrite directives. I also certainly don't want to disable the rewrite, as I've grown really fond of having slashes (/) instead of query strings that the search engines don't want to follow.
My site is at my document_root, and in the "main" (document_root) .htaccess file, here is what I added to bypass processing for sub-folders that are non-Drupal...
=========[ start of .htaccess snippet]==========
<IfModule mod_rewrite.c> RewriteEngine on
#stuff to let through (ignore) RewriteCond %{REQUEST_URI} "favicon.ico" [OR] RewriteCond %{REQUEST_URI} "/rss/" [OR] RewriteCond %{REQUEST_URI} "/test/" RewriteRule (.*) $1 [L]
====================[ end ]=====================
For each folder you want to bypass, add an RewriteCond line, and end all but the final RewriteCond with [OR].
In my sample, I don't want Drupal URL processing for any requests of the favicon.ico file, my non-Drupal RSS feed engine contained in the /rss/ sub-folder, and any PHP testing I happen to be doing in the /test/ folder.
The [L] in the rewrite rule tells it to stop there and bypass the rest of the rewrite rules.
Hope this helps.
-- Best regards, Gunther mailto:storysmith@softhome.net
Gunther,
Do you have a full example of your modified .htaccess file with your improvements?
Thanks,
Peter http://www.apockotos.com http://www.knightrider.org http://www.macmariner.org
Gunther wrote,
"Yes, it's definitely the rewrite directives. I also certainly don't want to disable the rewrite, as I've grown really fond of having slashes (/) instead of query strings that the search engines don't want to follow."
Thanks for the instructions, Gunther. I ended up changing the phpSurveyor installation over to a subdomain to avoid the issue. This isn't the best solution since I have fantastico with that hosting account, and want to be able to try out some of the additional software available through it without having to create subdomains and then modifying the fantastico installed software to recognize the new location.
I'll try your instructions out and see if they work for me, then add it to the Drupal handbook. This is the kind of thing I know *a lot* of people need to know how to do :)
Charlie
Thanks again Gunther. The directions were great and the Rewrite rules do the trick :)
I've modified your directions a little and added them to the Drupal handbook:
Charlie Lowe