htacces und subfolder (mal wieder?)
am 22.09.2008 - 22:15 Uhr in
Hallo,
ich wollte ein Projekt von mir in Drupal realisieren, warum werde ich ja nicht erleutern müssen :)
Aufjedenfall habe ich probleme mit der htaccess da Drupal in einen Unterordner betrieben werden soll.
Ich habe mir schon einige Hilfen und Tipps dazu angesehen, komme allerdings nicht weiter, kann es an einer falschen PHP Version oder ähnlichen Servseitigen Einstellungen liegen, das die neueste Drupal Version nicht unterstützt wird?
Vielleicht habt ihr erfahrenere Benutzer ja etwas mehr Ahnung von diesen Drupal Geschichten als ich Quereinsteiger von Joomla ;)
Meine derzeitige htaccess sieht zur Zeit so aus und liegt deaktiviert in meinen Unterordner.
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
Order allow,deny
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php
# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1.
<IfModule mod_php4.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not cache dynamically generated pages.
ExpiresByType text/html A1
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
RewriteCond %{HTTP_HOST} ^venom-media\.at$ [NC]
RewriteRule ^(.*)$ http://www.venom-media.at/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
RewriteCond %{HTTP_HOST} ^www\.venom-media\.at$ [NC]
RewriteRule ^(.*)$ http://venom-media.at/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
RewriteBase /design-lounge
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
AddHandler php5-cgi .php
php_flag register_globals off
php_flag magic_quotes_gpc on
# $Id: .htaccess,v 1.90.2.1 2008/07/08 09:33:14 goba Exp $
Für Serverinformationen habe ich hier eine PHP-Info Datei.
- Anmelden oder Registrieren um Kommentare zu schreiben
Re: htacces und subfolder (mal wieder?)
am 24.09.2008 - 15:59 Uhr
hallo venom,
versuch mal statt
RewriteBase /design-lounge
den kompletten pfad zu deinem verzeichnis zu schreiben
RewriteBase /var/www/web40/html/design-lounge.
(ich denke das müsste der absolute pfad in deinem fall sein).
lg
iwasnet
---
computer & communication
http://www.com-and-com.com
Leider auch
am 24.09.2008 - 19:13 Uhr
Leider auch erfolgslos...
Die htaccess muss schon im subfolder gleich wie drupal liegen ?!
Du hast bei beiden
am 25.09.2008 - 06:48 Uhr
Du hast bei beiden RewriteCond/RewriteRule die Auskommentierung entfernt, das kann ja nicht gehen ;-) Außerdem musst du bei dem deiner Wahl (with oder without www) auch noch dein subdirectory angeben. Ich hab's dir unten mal hingeschrieben, müsste so gehen, wenn du nicht sonst noch was geändert hast was ich übersehen hab.
Probier mal so:
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
Order allow,deny
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php
# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1.
<IfModule mod_php4.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not cache dynamically generated pages.
ExpiresByType text/html A1
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
RewriteCond %{HTTP_HOST} ^venom-media\.at$ [NC]
RewriteRule ^(.*)$ http://www.venom-media.at/design-lounge/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.venom-media\.at$ [NC]
# RewriteRule ^(.*)$ http://venom-media.at/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
RewriteBase /design-lounge
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /design-lounge
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
AddHandler php5-cgi .php
php_flag register_globals off
php_flag magic_quotes_gpc on
# $Id: .htaccess,v 1.90.2.1 2008/07/08 09:33:14 goba Exp $
Das funktioniert leider auch
am 25.09.2008 - 19:02 Uhr
Das funktioniert leider auch nicht, auch mit den absoluten Pfad und anderen Variationen wie dieser...
Sehr komisch.
Re: Das funktioniert leider auch
am 25.09.2008 - 19:16 Uhr
ohne .htaccess funktioniert deine drupal installation aber, oder?
lg
iwasnet
---
computer & communication
http://www.com-and-com.com
Ja tut sie, allerdings auch
am 25.09.2008 - 19:48 Uhr
Ja tut sie, allerdings auch nur alles, da global register on ist, aber das hab ich im griff mit der "php.ini" also sonst geht sie eigentlich problem los...
Die .htaccess ist allerdings wichtig, da man diese ja für Clean-URL's braucht.
Okay, ich bin nicht sicher
am 26.09.2008 - 07:15 Uhr
Okay, ich bin nicht sicher ob ich noch ne Zeile zugefügt hab oder du was anderes geändert. Deswegen hier meine .htaccess, angepasst auf deine Domain und Subdirectory. Probier's halt mal aus, kann ja nicht schaden :-)
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
Order allow,deny
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1.
<IfModule mod_php4.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not cache dynamically generated pages.
ExpiresByType text/html A1
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
RewriteCond %{HTTP_HOST} ^venom-media\.at$ [NC]
RewriteRule ^(.*)$ http://www.venom-media.at/design-lounge/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
RewriteBase /design-lounge
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /
# 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.81.2.4 2008/01/22 09:01:39 drumm Exp $
#
# Apache/PHP/Drupal settings:
#
php_value upload_max_filesize 200M
php_value post_max_size 200M
Zitat: Server error! The
am 26.09.2008 - 10:09 Uhr
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500
Iirgendwie hats da irgendwas? Kann es mit einer alten Server-Version zusammenhängen?
Achja so wie's aussieht muss ich vielleicht sowieso doch Drupal 5.x nehmen, weil mein Server daweil noch eine ältere MySQL Version hat, ich muss erst Anfragen wie es bei meinen Anbieter mit einen Update aussieht.
#
am 26.09.2008 - 12:23 Uhr
Mach mal einen Gartenzaun vor die Zeilen, die mit "php_value" oder "Options" oder "ErrorDocument" anfangen. Da wirst Du wohl irgendwo die Rechte nicht haben. Die info.php kann ich wegen des 500ers nicht sehen.
Die RewriteBase kann man m. E. auskommentiert lassen - das stört den Betrieb Drupals in einem Unterverzeichnis eigtl. gar nicht.
Oh Mann, ich hab natürlich
am 26.09.2008 - 19:04 Uhr
Oh Mann, ich hab natürlich überhaupt nicht aufgepasst und poste hier die ganze Zeit meine .htaccess von Drupal 5...
phpinfo
am 26.09.2008 - 21:48 Uhr
Ohhh - der 500er ist weg. Also PHP 4.4.4 sollte mit D6 funktionieren. Nur ein memory_limit von 8 MB kannst Du mit Drupal vergessen. Selbst bei 16 MB wäre mir nicht wohl. Über 32 MB kann man reden, wenn man nicht allzuviel vorhat. 64 MB wäre gemütlich, aber vermutlich nicht mehr ganz billig.
Ich habe auch Drupal5
am 27.09.2008 - 11:19 Uhr
Ich habe auch Drupal5 aufgeladen, aber auch das funktioniert, hab das Gefühl mein Server ist zu billig dafür...