![]() |
![]() ![]() |
![]() |
![]() ![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 898 Pomógł: 80 Dołączył: 31.05.2008 Ostrzeżenie: (20%) ![]() ![]() |
Mam pytanie, bo nie potrafię sobie skonfigurować apache poprawnie albo robię coś innego, otóż chce nauczyć się jak tworzyć własne strony błędów, mam taką konfigurację:
Kod <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName bdt.local ServerAlias www.bdt.local DocumentRoot "/home/cojack/Dokumenty/Projekty/BDT/web" <Directory "/home/cojack/Dokumenty/Projekty/BPDT/web"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order Allow,Deny Allow from All </Directory> ErrorLog "/home/cojack/Dokumenty/Projekty/BDT/tmp/logs/error.log" # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog "/home/cojack/Dokumenty/Projekty/BDT/tmp/logs/access.log" combined RewriteLog "/home/cojack/Dokumenty/Projekty/BDT/tmp/logs/rewrite.log" RewriteLogLevel 3 </VirtualHost> oraz .htaccess Kod # 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 "o fuck, blad!" # Set the default handler. #DirectoryIndex index.php # 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} ^example\.com$ [NC] # RewriteRule ^(.*)$ http://www.example.com/$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 /drupal # # If your site is running in a VirtualDocumentRoot at http://example.com/, # uncomment the following line: RewriteBase / # Rewrite URLs of the form 'x' to the form 'index.php?q=x'. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] podpierniczony z drupala, no i teraz jak wysyłam 404 z phpca to nie dostaję komunikatu o tej treści co jest w .htaccess, ale gdy wyłączę rewrite engine to komunikat się pojawia, nie mogę tego zrozumieć, może mi to ktoś wyjaśnić? -------------------- cojack blog - mój blog (na jakiś czas off).
"jak czegoś nie wiem, to nie myślę że wiem" - moja domena |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 22.06.2025 - 23:47 |