mam kilka problemow z tymi przyjaznymi URLami
strone trzymam w podkatalogu cmssimple
./
--/cmssimple
plik htaccess
Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteBase /cmssimple
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# except for form POSTS
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]
Code: Select all
#------------
#URL Settings
#------------
#What type of URL rewriting should we be using for pretty URLs? Valid options are:
#'none', 'internal', and 'mod_rewrite'. 'internal' will not work with IIS some CGI
#configurations. 'mod_rewrite' requires proper apache configuration, a valid
#.htaccess file and most likely {metadata} in your page templates. For more
#information, see:
#http://wiki.cmsmadesimple.org/index.php/FAQ/Installation/Pretty_URLs#Pretty_URL.27s
$config['url_rewriting'] = 'mod-rewrite';
#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '/';
#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy? (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = false;
#If using none of the above options, what should we be using for the query string
#variable? (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';
#$config['url_rewriting'] = 'mod_rewrite'; // this is new from 1.6
#$config['page_extension'] = '.html';
#$config['use_hierarchy'] = true; // this will be the standard from 1.7
#$config['query_var'] = 'page';
#$config['internal_pretty_urls'] = false;
$config['assume_mod_rewrite'] = true;
http://www.nazwastrony.pl/cmssimple/o-nas
ale linki w menu generuja sie w postaci
http://www.nazwastrony.pl/cmssimple/ind ... s&hl=pl_PL
dlaczego ?
ale jest gorszy problem
przyjazne URLe w newsach ...
przy wlaczonym $config['url_rewriting'] = 'mod-rewrite'; adresy newsow wygladaja w kosmicznej postaci
Code: Select all
index.php?mact=News,cntnt01,detail,0&cntnt01articleid=1&cntnt01origid=74&cntnt01returnid=83&hl=pl_PL
przy wlaczonym $config['url_rewriting'] = 'internal'; jest lepiej ale tez cos nie tak
index.php/pl_PL/news/1/83/temat-wiadomosci/
natomiast przy zadnym z tych dwoch ustawien nie dziala dla Newsow adres w postaci
http://www.nazwastrony.pl/temat-wiadomosci/