PDA

Zobacz pełną wersję : url z index.php



Gru
05-04-2009, 17:36
Witam,
mam problem z ładowaniem strony jeśli nie dopiszę końcówki index.php strona ładuje się tylko bez szablonu. Jeśli dodam index.php ładuje się poprawnie.

http://gru.home.pl/pluton/paintball/index.php

Za jakiś czas strona będzie pod domeną paintball.pluton.pc.pl lub pluton.pc.pl/paintball

Gdy grzebałem w opcjach:

Optymalizacja dla wyszukiwarek Proste adresy Nie Tak Korzystaj z mod_rewrite Nie Tak http://gru.home.pl/pluton/paintball/includes/js/ThemeOffice/warning.png Adresy z przyrostkiem Nie TakTo po przestawieniu opcji w pozycje TAK (każdej z osobna i razem) strona nie ładuje się wcale bez podania index.php lub laduje 404.

Pomijając problem z koniecznością dopisywania index.php, wszystko ładnie się ładuje i instaluje. Nie pojawiają się żadne błędy strona jest już połączona brigdem z phpbb3 (współdzielona baza danych). A w katalogu głównym strony nie ma pliku index.html lub podobnego.



Informacje o systemie Ustawienie Wartość PHP uruchomione w: FreeBSD gru.home.pl 6.2-STABLE i386 Wersja bazy danych: 5.0.66a-log Kodowanie połączenia MySQL: utf8_general_ci Wersja PHP: 5.2.6 Serwer WWW: IdeaWebServer/v0.60 PHP działa na: ucgi5 Wersja Joomla!: Joomla! 1.5.10 Production/Stable [ Wohmamni ] 27-March-2009 23:00 GMT Przeglądarka: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729)UPDATE

Zauważyłem, że w hataccess.txt "mod_rewrite in use RewriteEngine On"
a w panelu administracyjnym mam OFF. Co jest grane. I poza tym hataccsess.txt jest dostępny przez przeglądarkę czy to bezpieczne i czy mogę go zamienić na .hataccess pomimo że serwerem jest IdeaWebServer?


##
# @version $Id: htaccess.txt 10492 2008-07-02 06:38:28Z ircmaxell $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


################################################## ###
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
#
################################################## ###

## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
# mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a ********** tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section

Bazyl
05-04-2009, 21:12
Nie pisałeś już o tym?
@zwiastun odpowiadał: zobacz zmienną live_site w configuration.php

W htaccess.txt możesz nawet magisterkę umieścić, ale do czasu, gdy nie zmienisz go na ".htaccess" :).

Jeden temat = jeden post.

zwiastun
06-04-2009, 00:54
W każdym badź razie, jak już zmienisz, to linię
# RewriteBase /
odkomentuj
a po / wpisz nazwę katalogu z Joomla! od korzenia

Gru
06-04-2009, 19:07
@ bazyl

Oj... moja magisterka to prawie 120 stron...
A co do htaccess to musi być w postaci .htaccess a nie htaccess.txt?
Myślałem, że jest to zależne od serwera HTTP a nie od środowiska w jakim jest on zainstalowany. Jeśli winda to .txt jeśli linux to .htaccess bez rozszerzenia - dobrze kumam?

dkint
06-04-2009, 19:11
Witam

Tutaj masz odpowiedź - http://pl.wikipedia.org/wiki/Htaccess, ogólnie jeśli masz serwer postawiony na Apachu to nie ma innej opcji niż .htaccess

pozdrawiam
Krzysiek

ppilus
06-04-2009, 21:08
Inną opcją może być nadgorliwy administrator, który zadeklaruje inną nazwę dla tego pliku w konfiguracji Apache :)