- Home
- Categorie
- Coding e Sistemistica
- Coding
- Pagine dinamiche
- 
							
							
							
							
							
Pagine dinamicheCiao ragazzi...in più siti ho letto che le pagine dinamiche tipo bed-breakfast.php?id=15 sono poco appetibili ai motori di ricerca. 
 Ho anche sentito che consigliano di usare il mod_rewrite di Apache.è vero? 
 eventualmente conoscete guide su come impostare il mod_rewrite?
 
- 
							
							
							
							
							
Si è vero comunque nel tuo caso uno script con un solo parametro non crea eccessivi problemi ma se si usano 3 o 4 parametri Google incrocia le braccia e non vuole proprio saperne  Per usare il mod_rewrite devi editare il file .htaccess in un modo simile al seguente Options +FollowSymLinks 
 RewriteEngine on
 RewriteRule file-(.)-(.).html$ /show_file.php?maincat=$1&seccat=$2in questo caso quando si digita per esempio http://www.nomesito.com/file-gestione-archivi.html apache converte la richiesta in http://www.nomesito.com/show_file.php?maincat=gestione&seccat=archivi ovviamente puoi usare più di 2 parametri aggiungendo degli * a sinistra e dei parametri con nomeparam=$n Spero di essere stato d'aiuto 
  
 
- 
							
							
							
							
							
grazie mille...ho provato così ma nisba...dunque: - file .htaccess dentro alla cartella agriturismo/
 RewriteEngine on RewriteRule ^bed-breakfast-([^/]+).html bed-breakfast.php?id=$1 [L]- link in index.php
 [url="<?php echo $URI ?>agriturismo/bed-breakfast-<?php echo $row3['id']; ?>.html"]"><?php echo $row3['h1']; ?>- errore dato dal server
 Not Found 
 The requested URL /www.tenutagoroveneto.it/httpdocs/agriturismo/bed-breakfast.php was not found on this server.Dove sbaglio? 
 
- 
							
							
							
							
							
manca lo script bed-breakfast.php? 
 
- 
							
							
							
							
							
il file c'è! 
 è dentro ad agriturismo/ assieme ad .htaccessnon è che nel .htaccess debba indicare qualche percorso particolare? 
 
- 
							
							
							
							
							
puoi mettere agriturismo/bed-breakfast.php..... 
 
- 
							
							
							
							
							
niente scrive The requested URL /www.tenutagoroveneto.it/httpdocs/agriturismo/agriturismo/bed-breakfast.php was not found on this server. quello che da fastidio è httpdocs 
 
- 
							
							
							
							
							
dipende se il tuo server è configurato così....cioè tiene il nome di dominio in una sottodirectory e i file html e php nella dir httpdocs.....dovrebbe funzionare....può pure essere un problema di configurazione 
 
- 
							
							
							
							
							
e allora secondo te cosa c'è che non va? 
 
- 
							
							
							
							
							
ma non so dovrei sapere com'è configurato il server....potrebbe essere un problema di permessi.....di directory....di scripting engine 
 
- 
							
							
							
							
							
@Tdz said: e allora secondo te cosa c'è che non va?il server è tuo o sei su hosting? Prova a dare la dir assoluta, non relativa: /agriturismo/... 
 
- 
							
							
							
							
							Ma che cosa hai linux? 
 
- 
							
							
							
							
							
sono su hosting linux 
  
 
- 
							
							
							
							
							
@PaTeR said: @Tdz said: 
 e allora secondo te cosa c'è che non va?il server è tuo o sei su hosting?Prova a dare la dir assoluta, non relativa: /agriturismo/... in che senso la dir assoluta? 
 
- 
							
							
							
							
							
@Tdz said: @PaTeR said: 
 @Tdz said:
 e allora secondo te cosa c'è che non va?il server è tuo o sei su hosting?Prova a dare la dir assoluta, non relativa: /agriturismo/... in che senso la dir assoluta? invece di agriturismo/... prova a dare /agriturismo/ 
 
- 
							
							
							
							
							
@Tdz said: - link in index.php
 [url="<?php echo $URI ?>agriturismo/bed-breakfast-<?php echo $row3['id']; ?>.html"]"><?php echo $row3['h1']; ?>- errore dato dal server
 Not Found 
 The requested URL /www.tenutagoroveneto.it/httpdocs/agriturismo/bed-breakfast.php was not found on this server.cosa contiene la variabile 
 $URI ?
 possibile che ti restituisca: /www.tenutagoroveneto.it/httpdocs/agriturismomentre dovrebbe restituire: http://www.tenutagoroveneto.it/ ? 
 
- 
							
							
							
							
							
nisba... questo è l' .htaccess RewriteEngine on RewriteRule ^/agriturismo/bed-breakfast-([^/]+).html bed-breakfast.php?id=$1 [L]questo l'errore Not Found The requested URL /agriturismo/bed-breakfast-1.html was not found on this server. dai che ce la facciamo dai che ce la facciamo
 
- 
							
							
							
							
							
@Jantima said: @Tdz said: - link in index.php
 [url="<?php echo $URI ?>agriturismo/bed-breakfast-<?php echo $row3['id']; ?>.html"]"><?php echo $row3['h1']; ?>cosa contiene la variabile 
 $URI ?
 possibile che ti restituisca: /www.tenutagoroveneto.it/httpdocs/agriturismomentre dovrebbe restituire: http://www.tenutagoroveneto.it/ ? La variabile $URI contiene http://www.tenutagoroveneto.it/ ... grazie dell'aiuto  
 
- 
							
							
							
							
							
Prova a togliere o cambiare la regola e fai delle prove finchè non trovi la soluzione che ti serve. 
 Prova a mettere:
 AllowOverride All
 prima di
 RewriteEngine onForse la regola che usi è sbagliata e ti da questo effetto, ma non saprei dire come cambiarla  
 :bho:Com'è che hai postato 3 "errori del server diversi in 3 post? errore dato dal server Not Found 
 The requested URL /www.tenutagoroveneto.it/httpdocs/agriturismo/bed-breakfast.php was not found on this server.niente scrive: The requested URL /www.tenutagoroveneto.it/httpdocs/agriturismo/agriturismo/bed-breakfast.php was not found on this server. questo l'errore: Not Found 
 The requested URL /agriturismo/bed-breakfast-1.html was not found on this server.cosa hai cambiato nel frattempo? 
 
- 
							
							
							
							
							
@Tdz said: nisba... questo è l' .htaccess RewriteEngine on RewriteRule ^/agriturismo/bed-breakfast-([^/]+).html bed-breakfast.php?id=$1 [L]questo l'errore Not Found The requested URL /agriturismo/bed-breakfast-1.html was not found on this server. dai che ce la facciamo/agriturismo/bed-breakfast-1.html dai che ce la facciamo/agriturismo/bed-breakfast-1.htmlaggiungi il flag R alla rewriterule insieme alla L