• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: (SOLVED) abilitazione pretty url
PostPosted: Wed Feb 29, 2012 12:00 pm 
Offline
Forum Members
Forum Members

Joined: Tue Feb 28, 2012 1:24 pm
Posts: 176
ciao solito problema con il mod_rewrite

versione 1.10.3
server : servage.net
MySQL Version: MySQL v.5



copiato e rinominato file .htacces nella root
incollato nel file config.php il codice:

$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';

risultato le url vengno riscrittte ma ricevo se navigo l'errore "page not found"


allego anche il file .htaccess

# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"

#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off

#Options +FollowSymLinks

# To prevent E_STRICT problems with PHP 5.3+ you can uncomment the following lines
# Note: These settings should only be enabled for production sites!
#php_flag display_startup_errors 0
#php_flag display_errors 0
#php_flag html_errors 0
#php_value docref_root 0
#php_value docref_ext 0

<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>

<IfModule mod_header.c>
# Disable ETags
Header unset ETag
FileEtag None
</IfModule>

<IfModule mod_deflate.c>
# Compress css, plaintext, xml, gif, and images in transport.
AddOutputFilterByType DEFLATE text/css text/plain text/xml image/gif image/jpeg image/png
</IfModule>

<IfModule mod_expires.c>
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
# Set expires tags on various files... so that the browser wont attempt to reload them.
ExpiresActive On




cosa posso fare ??

(premetto che su vecchie versione avevo fatto tutto ed andava)

ciao e grazie in anticipo per l'aiuto


Last edited by giapippo on Mon Mar 12, 2012 6:09 pm, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: abilitazione pretty url
PostPosted: Thu Mar 01, 2012 8:02 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Mon Jan 14, 2008 9:08 pm
Posts: 599
Location: Villadossola - (VB)/Italy
giapippo \giapippo:
...
risultato le url vengno riscrittte ma ricevo se navigo l'errore "page not found"
...


sicuro che la root del sito sia "/" e non lo hai magari su una subdirectory?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: abilitazione pretty url
PostPosted: Thu Mar 01, 2012 9:15 pm 
Offline
Forum Members
Forum Members

Joined: Tue Feb 28, 2012 1:24 pm
Posts: 176
ciao innanzi tutto grazie per la risposta

se guardo con filezilla il mio sito e' nella cartella www

allora ho sistemato (per prova) i 2 file cosi:

.htaccess


# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"

#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off

#Options +FollowSymLinks

# To prevent E_STRICT problems with PHP 5.3+ you can uncomment the following lines
# Note: These settings should only be enabled for production sites!
#php_flag display_startup_errors 0
#php_flag display_errors 0
#php_flag html_errors 0
#php_value docref_root 0
#php_value docref_ext 0

<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /www

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>

<IfModule mod_header.c>
# Disable ETags
Header unset ETag
FileEtag None
</IfModule>

<IfModule mod_deflate.c>
# Compress css, plaintext, xml, gif, and images in transport.
AddOutputFilterByType DEFLATE text/css text/plain text/xml image/gif image/jpeg image/png
</IfModule>

<IfModule mod_expires.c>
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
# Set expires tags on various files... so that the browser wont attempt to reload them.
ExpiresActive On
ExpiresDefault "access plus 1 year"
<IfModule mod_header.c>
# Setting cache control to public allowes proxy servers to cache the items too.
Header set Cache-Control "public"
</IfModule>
</FilesMatch>
</IfModule>


e questo e' il config.php

<?php
# CMS Made Simple Configuration File
# Documentation: /doc/CMSMS_config_reference.pdf
#
$config['dbms'] = 'mysql';
$config['db_hostname'] = 'xxxx';
$config['db_username'] = 'xxx';
$config['db_password'] = 'xxx';
$config['db_name'] = 'xxx';
$config['db_prefix'] = 'cms_';
$config['db_port'] = 0;
$config['root_url'] = 'http://www.gianlucacompagno.com';
$config['timezone'] = 'Europe/Rome';
$config['default_encoding'] = 'utf-8';
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '';
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
?>



ho prevato sia con che senza www

ma non cambia niente

help me please :)

ciao a tutti e grazie in anticipo


Last edited by Rolf on Fri Mar 02, 2012 4:15 am, edited 1 time in total.
removed database config


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: abilitazione pretty url
PostPosted: Sat Mar 03, 2012 9:08 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Mon Jan 14, 2008 9:08 pm
Posts: 599
Location: Villadossola - (VB)/Italy
a parte di non pubblicare al mondo la chiave d'accesso al tuo DB (ringrazia Rolf ;D ) hai provato a fare un "riordina pagine"?
l'errore "page not found" ce l'hai solo sulle pagine o, ad esempio, nel rewrite degli url delle news?
posti un esempio di url che ti da errore?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: abilitazione pretty url
PostPosted: Sun Mar 04, 2012 6:29 pm 
Offline
Forum Members
Forum Members

Joined: Tue Feb 28, 2012 1:24 pm
Posts: 176
ciao l'errore, a parte la home page, e' su tutte le pagine sia news che non

ho messo il sito visibile, piu' che altro cio che ho scritto come bozza fino ad adesso

ciao grazie mille

p.s. riordina pagine dove lo trovo ?

_________________
http://www.gianlucacompagno.com/


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: abilitazione pretty url
PostPosted: Sun Mar 04, 2012 8:28 pm 
Offline
Forum Members
Forum Members

Joined: Tue Feb 28, 2012 1:24 pm
Posts: 176
dimenticavo

servage, server dove ospito il sito ha questa opzione che posso abilitare o no


You are able to use .htaccess files with your servage account if your required. These Files can be used to influence the webservers configuration on a per-directory level. The most common usage is to configure mod_rewrite, mod_redirect or to create password protected directories that requires user authentication.
Normally we advise you to keep this option turned off as it can affect your website performance negatively or even cause the website to be offline due to misconfigurations in .htaccess files.


.htaccess status: Enabled or Disabled

_________________
http://www.gianlucacompagno.com/


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: abilitazione pretty url
PostPosted: Sun Mar 04, 2012 8:44 pm 
Offline
Forum Members
Forum Members

Joined: Tue Feb 28, 2012 1:24 pm
Posts: 176
risolto!!!

dovevo abilitare sul pannello di controllo di servage la modifica dell file

.htaccess

grazie mille lo per l'aiuto!!

_________________
http://www.gianlucacompagno.com/


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting