View previous topic :: View next topic |
Author |
Message |
jblambert -
Joined: 05 Apr 2006 Posts: 3
|
Posted: Wed Apr 05, 2006 8:37 pm Post subject: abyss web server, drupal, clean urls, mod_rewrite, voting |
|
|
hi...
i have posted this on drupal.org's forum as well.
i have been happily using abyss web server, the new version of which has fastcgi and php, perl, asp.net, and rubyrailification, all that muccajucca. i'm feeling loyal and want to see if i can solve this and use abyss, and i think a good, clearly presented solution would help drupal spread, as abyss provides sweet features and ease of use with nice performance. i host my web at home via dynamic ip but please don't hate me for these three strikes: 1) windows; 2) non-apache; 3) self-hosting. whatever we don't agree on, drupal binds us.
sadly, i find abyss web server doesn't support or emulate mod_rewrite and thus doesn't work with clean urls and with some modules, notably the voting module (the one with 5 stars). i've found some hacks which i was unable to make work, lacking any concrete, specific instructions for drupal. see http://www.aprelium.com/forum/viewtopic.php?p=46856#46856
my version of the code i'm trying now as my 404.php page is this...i have drupal in a /drupal directory off the root.
<?php
/* Add in this array the list of (old path => new path) pairs */
$redirection = array(
'^drupal/(.*)$' => '/drupal/index.php?q=$1'
);
/* Get the URI and trim leading slashes */
$uri = ltrim($_SERVER["REDIRECT_SCRIPT_NAME"], "/");
foreach ($redirection as $key => $value)
{
if (eregi($key, $uri))
{
/* Convert the replacement string syntax - $1 -> \1 */
/* and perform the substitution */
$new_uri = eregi_replace($key, str_replace("$", "\\", $value), $uri);
break;
}
}
if (isset($new_uri))
{
header("Status: 307");
header("Location: $new_uri");
exit;
}
?>
following that is html to display if this is a real 404. i left it out since i didn't know how that would post in the forum. i activated this 404.php page by setting it as the custom 404 in abyss, and it is working in that a real 404 produces the 404 message.
i'm wondering if it's a matter of a misplaced or missing character. i know zilch as you can see but am learning so i appreciate your kind assistance.
from drupal i still get the following when trying to enable clean urls...
It appears your host is not configured correctly for Clean URLs. Please check for ModRewrite support with your administrator.
The configuration options have been saved.
the five-star "voting" module now does not show "error" as it did, but the votes are not persistent upon refresh and a look in the mysql db shows no entries in that table.
i also noted and tried to make work with abyss the iis solution for settings.php as in http://drupal.org/node/3854 but to no avail thus far.
i've researched this seriously and am devoted to abyss and drupal but have to say i wish drupal did not depend on mod_rewrite. i also wish for an open source mod_rewrite hack for other web server programs somehow. i realize i may have just said a horrible or stupid or both thing, but it's feedback for those who think all feedback is good.
under no circumstances do i want to abandon abyss. but i am committed to drupal it seems, and hope they can coexist with full functionality. i know there has been talk of addressing this in some way other than 404 traps.
regarding that, does using the 404 trick mean that google and other engines will be seeing lots of 404s or 307s and will this have negative impact on seo?
lastly, peripherally, i am going to be creating a community site to coexist and interact with an existing website of 15,000 photos. i am certain a new community site will be a great thing but i will have many challenges porting over the images, or finding a way to link to them or bring them into drupal so they can be randomly shown, voted on, all that. any comments on that issue are welcome. |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Apr 06, 2006 11:34 am Post subject: Re: abyss web server, drupal, clean urls, mod_rewrite, votin |
|
|
jblambert,
We're going to try using Drupal with the first redirection script. There is no apparent reason why it shouldn't work that way.
Quote: | i also noted and tried to make work with abyss the iis solution for settings.php as in http://drupal.org/node/3854 but to no avail thus far. |
This solution seems also good. What behavior have you experienced with it? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
admin Site Admin
Joined: 03 Mar 2002 Posts: 1332
|
Posted: Thu Apr 06, 2006 3:38 pm Post subject: Re: abyss web server, drupal, clean urls, mod_rewrite, votin |
|
|
jblambert,
After checking the various scripts it appears that they work with GET requests only. Which means that if you post a form to one of the modified URLs you will get unexpected results.
Could you please get in touch with our technical support to receive soon a preview version which solves the URL rewriting problem? _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
 |
jblambert -
Joined: 05 Apr 2006 Posts: 3
|
Posted: Thu Apr 06, 2006 6:48 pm Post subject: thanks plus more info |
|
|
thank you. i will contact tech support for this new version. i hope it will work to increase the audience for abyss web server.
i got the voting module to work by applying patches that appear to have nothing to do with mod_rewrite (my bad)...i had researched before but found reference to this in the changelog.txt for the module but not in the readme or install...still, my bad...here's the fix...
http://drupal.org/node/30274
this is another interesting page on clean urls in drupal, again regarding iis. i don't know if it is helpful or not...
http://drupal.org/node/46429
and on clean url mod_rewrite performance...
http://drupal.org/node/43788
in the interest of information i will post the .htaccess drupal settings in case this i helpful to aprelium or anyone here. if there is a solution that makes drupal 4.6 (and hopefully 4.7rc1) work with abyss i'll gladly post to drupal.org if aprelium does not.
the reason i inlude this is that the .htaccess mentions several forms of url rewriting. my version 4.66 writes the index.php form. here's the file contents...thanks so much for your effort....
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<Files ~ "(\.(inc|module|pl|sh|sql|theme|engine|xtmpl)|Entries|Repositories|Root|scripts|updates)$">
Order deny,allow
Deny from all
</Files>
# Set some options.
Options -Indexes
Options +FollowSymLinks
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More exist in sites/default/settings.php, but
# the following cannot be changed at runtime. The first IfModule is
# for Apache 1.3, the second for Apache 2.
<IfModule mod_php4.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
</IfModule>
<IfModule sapi_apache2.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
</IfModule>
# Reduce the time dynamically generated pages are cache-able.
<IfModule mod_expires.c>
ExpiresByType text/html A1
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
#RewriteBase /drupal
# Rewrite old-style URLs of the form 'node.php?id=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
#RewriteRule node.php index.php?q=node/view/%1 [L]
# Rewrite old-style URLs of the form 'module.php?mod=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
#RewriteRule module.php index.php?q=%1 [L]
# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
# $Id: .htaccess,v 1.66 2005/03/20 19:15:00 dries Exp $ |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Apr 07, 2006 12:06 pm Post subject: Re: thanks plus more info |
|
|
jblambert,
You're welcome. We already have a running Drupal installation and all the required files (including .htaccess). The problem as we said is with the POSTed data (web forms) which could not be handled correctly if you use the 404 hack.
We're working on a more appropriate solution and we'll send you a preview as soon as it will be ready. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
jblambert -
Joined: 05 Apr 2006 Posts: 3
|
Posted: Fri Apr 07, 2006 5:00 pm Post subject: excellent |
|
|
thank you so much for wanting to address this as a quality solution for drupal. i think it will have rewards for both the abyss web server and drupal communities. thanks again. |
|
Back to top |
|
 |
loloyd -
Joined: 03 Mar 2006 Posts: 435 Location: Philippines
|
Posted: Fri May 26, 2006 11:00 am Post subject: Problem solved |
|
|
If this still poses a problem until today (2 month-difference), you might want to revisit http://www.aprelium.com/forum/viewtopic.php?p=46856#46856
as I have simplified the problematic line to effect a working URL rewrite emulation.
I don't know much about PHP either and I maybe I got lazy but I've been programming for 22 years. Wisdom must account for something when there is a deficiency in knowledge hehehe.
If you try it, please inform me if it also worked for you too. Good day. _________________
http://home.loloyd.com/ is online if the logo graphic at left is showing. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|