Error 404 a causa del file htaccess

Vegas7ar

Nuovo Utente
16 Dic 2014
1
0
0
Ciao a tutti! sono un niubbo alle prese con il primo sito web.
Era stato creato e amministrato da un altro e adesso è in gestione a me.
l'ho trasferito su aruba su server linux, ma il sito (qualsiasi pagina) mostra error 404.


Se aggiungo l'estensione .php alla fine le pagine si visualizzano normalmente.
Credo sia colpa di qualche comando RewriteRule, ma ho provato a modificare il file htaccess più volte prendendo spunti dalla rete e niente sembra funzionare.

Qualcuno riesce a capire dove è l'inghippo?

Codice:
RewriteEngine On

RewriteRule ^(.*)\.html $1\.php 

RewriteCond %{HTTP_HOST} ^miosito\.com$
RewriteRule ^(.*)$ "http\:\/\/www\.miosito\.com\/$1" [R=301,L]

ErrorDocument 404 /en/404.php

# MOD_DEFLATE
SetOutputFilter DEFLATE
#BrowserMatch ^Mozilla/4         gzip-only-text/html
#BrowserMatch ^Mozilla/4\.0[678] no-gzip
#BrowserMatch \bMSIE             !no-gzip !gzip-only-text/html
#SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
#Header append Vary User-Agent env=!dont-vary

# MOD_CACHE
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
<FilesMatch "\.(js|css|pdf|txt)$">
  Header set Cache-Control "max-age=604800"
</FilesMatch>
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault A300
ExpiresByType image/x-icon A2592000
ExpiresByType application/x-javascript A3600
ExpiresByType text/css A3600
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpeg A604800
ExpiresByType text/plain A300
ExpiresByType application/x-shockwave-flash A604800
ExpiresByType video/x-flv A604800
ExpiresByType application/pdf A604800
ExpiresByType text/html A300
</ifModule>

# Inglese - Pagina di Default 
RewriteRule ^$ /en/index [L,R=301]
# Italiano
#RewriteCond %{HTTP:Accept-Language} ^it [NC]
#RewriteRule ^$ /it/index [L,R=301]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

In una sotto cartella è posizionato un altro htacces
Codice:
RewriteEngine On

RewriteRule ^(.*)\.html $1\.php 

RewriteCond %{HTTP_HOST} ^miosito\.com$
RewriteRule ^(.*)$ "http\:\/\/www\.miosito\.com\/$1" [R=301,L]

RewriteRule ^index(|/)$  index.php
RewriteRule ^certified-scrum-master-course(|/)$  /downloads/Certified_Scrum_Master-IT.pdf
RewriteRule ^agile-for-decision-maker(|/)$  /downloads/Seminario_Metodi_Agili_Decision_Makers-IT.pdf
RewriteRule ^scheduled-courses(|/)$  calendario.php
RewriteRule ^downloads-area(|/)$  download.php
RewriteRule ^contact-us(|/)$  contatti.php
RewriteRule ^registration(|/)$  registrazione.php
RewriteRule ^certified-scrum-master(|/)$  landing.php
RewriteRule ^discovering-scrum(|/)$  landing-discovering-scrum.php

ErrorDocument 404 /en/404.php
 
Discussioni simili
Autore Titolo Forum Risposte Data
S 404 Error " Page not Find" Error SEO e Posizionamento 0
A Server Apache immagine not found (ERROR 404) Apache 5
P Page not found Error 404 Joomla 1
R HTTP Error 404 - File or directory not found. Classic ASP 1
L Error Code: 1215. Cannot add foreign key constraint MySQL 3
M HTTP Status 500 - Internal Server Error. Java 0
A Uncaught Error: jQuery 1
F Uncaught (in promise) Error: 3000ms timeout exceeded Javascript 0
U Campo vuoto data errore Fatal error: PHP 2
W ADODB.Recordset error '800a0bb9' Classic ASP 2
D error text in table HTML e CSS 11
W Microsoft OLE DB Provider for Visual FoxPro error '80040e14' Function name is missing ). Classic ASP 0
W Parse error: syntax error, unexpected '$result' (T_VARIABLE) PHP 4
W Errore di run-time di Microsoft VBScript error '800a0035' Impossibile trovare il file Classic ASP 0
I Fatal error: Query Failed! SQL: SELECT * INTO OUTFILE PHP 1
G Upload file error Apache 0
L [PHP] Fatal error: Call to a member function prepare() on null in PHP 0
D [PHP] Fatal error: Class 'COM' not found in C:\..... PHP 6
T MySQL ERROR 1064 MySQL 1
T [PHP] aiuto....Fatal error: Uncaught Error:non riesco a capire PHP 1
T [PHP] ...Parse error che non c'è... PHP 7
C [PHP] Errore "Fatal error: Call to undefined function getTotalUsers()" PHP 2
V [MySQL] You have an error in your SQL syntax MySQL 1
G PHPMailer: SMTP error Gmail PHP 8
G [WordPress] [PHP] Parse error: syntax error, unexpected '$x332cbce1' WordPress 2
I [PHP] Login Facebook SDK returned an error: No URL set! PHP 0
bubino8 [PHP] Query syntax error PHP 6
J [PHP] Recoverable fatal error: PHP 4
momeraths [WordPress] cURL error: problema aggiornamento/installazione plugin WordPress 4
A [PHP] FPDF error: Some data has already been output, can't send PDF file PHP 5
otto9due Error anomalo durante invio dati $.ajax Ajax 20
J [PHP] fatal error PHP 1
N [PHP] problema Parse error in file configurazione PHP 3
F Console Error jQuery 1
C PHP errore Fatal Error: Allowed Memory Size of ... Bytes Exhausted PHP 7
K [ASP] Errore: ADODB.Field error '800a0bcd' Classic ASP 1
Z HTTP ERROR 500 - La pagina non funziona - Joomla! Joomla 0
U [PHP] Fatal error: Call to a member function Query() PHP 1
U [PHP] Parse error: syntax error, unexpected variabile (T_VARIABLE) PHP 8
C [PHP] internal error paypal PHP 6
ANDREA20 [PHP] syntax error, unexpected PHP 4
Fuego2806 [PHP] Errore 500 Internal Server Error - sito Joomla! Joomla 10
ANDREA20 [PHP] syntax error, unexpected T_ELSE [era]urgentissimo] PHP 15
A [PHP] syntax error, unexpected T_STRING su html PHP 11
Antoyosh Fatal error con Wordpress WordPress 5
C Errore 500 (internal server error) PHP 1
G Fatal error: Uncaught Error: Call to undefined method UserController PHP 0
G Parse error: syntax error, unexpected '=' PHP 2
O Fatal error: Call to undefined function testNome() in C:\xampp\...\...\index.php on line 51 PHP 4
gandalf1959 Parse error: syntax error, unexpected T_VARIABLE PHP 2

Discussioni simili