Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: ht.access - problem z przekierowaniem.
Forum PHP.pl > Forum > Serwery WWW
lukpio3
Witam.
Jestem w trakcie przenoszenia strony na inny serwer i powstał pewien problem. Na wstępnie powiem że strona będzie stała na hostingu linuxpl.com i jest oparta na CMS-ie MODx 1.0.6 (poprzednio była na starszej wersji 1.0.4). Strona niby działa. Niby tzn działa główna. Schody zaczynają się gdy chcę przejść na którąś z podstron. Jak się domyślam skopane jest coś w ht.access (w sumie nie wiem czemu to się nie nazywa .htaccess no ale tak CMS wrzuciał. Na poprzednim ten plik się zwał właśnie .htacces ale mniejsza o to. Wchodzę na stronę (przykładowy adres): www.xyz.pl, strona się wyświetla prawidłowo. Chcę przejść do którejś z zakładek, np niech się ona nazywa "abc" w pasku przeglądarki mam adres www.xyz.pl/abc a zamias zawartości strony otrzymuję błąd:


Not Found

The requested URL /urzad-gminy-leszno/informator-teleadresowy was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8o DAV/2 mod_python/3.3.1 Python/2.6.6 mod_fastcgi/2.4.6 mod_wsgi/3.3 Phusion_Passenger/3.0.7 mod_fcgid/2.3.7-dev Server at mits.waw.pl Port 80


Poniżej zamieszczam zawartość swojego pliku ht.access

http://svn.modxcms.com/docs/display/MODx09...y+URL+Solutions
# including for unexpected logouts in multi-server/cloud environments
# and especially for the first three commented out rules

#php_flag register_globals Off
#AddDefaultCharset utf-8
#php_value date.timezone Europe/Moscow

Options +FollowSymlinks
RewriteEngine On
RewriteBase /

# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]

# Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
#RewriteRule (.*) http://www.example.com/$1 [R=301,L]

# Exclude /assets and /manager directories and images from rewrite rules
RewriteRule ^(manager|assets)/*$ - [L]
RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]

# For Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

# Reduce server overhead by enabling output compression if supported.
#php_flag zlib.output_compression On
#php_value zlib.output_compression_level 5
">
# For full documentation and other suggested options, please see
# http://svn.modxcms.com/docs/display/MODx09...y+URL+Solutions
# including for unexpected logouts in multi-server/cloud environments
# and especially for the first three commented out rules

#php_flag register_globals Off
#AddDefaultCharset utf-8
#php_value date.timezone Europe/Moscow

Options +FollowSymlinks
RewriteEngine On
RewriteBase /

# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]

# Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
#RewriteRule (.*) http://www.example.com/$1 [R=301,L]

# Exclude /assets and /manager directories and images from rewrite rules
RewriteRule ^(manager|assets)/*$ - [L]
RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]

# For Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

# Reduce server overhead by enabling output compression if supported.
#php_flag zlib.output_compression On
#php_value zlib.output_compression_level 5
Necsord
Zacznij od zmiany ht.access na .htaccess. MODx nie dyktuje jak ma się nazywać ten plik, to nie on go wykorzystuje tylko serwer.
http://perishablepress.com/stupid-htaccess-tricks/#ess5
lukpio3
Oczywiście, tak już robiłem. Z tym że jak usunę ht.access i wrzucę .htaccess to już w ogóle mi kompletnie nic nie działa. Ani panel administracyjny CMSa ani strona. Wyświetla mi tylko taki błąd:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@adres_strony.pl and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Cały czas siedzę i próbuję to jakoś rozgryźć, jak na razie bezskutecznie.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.