• 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  [ 2 posts ] 
Author Message
 Post subject: przyjazne URL - pomoc
PostPosted: Wed Nov 09, 2011 9:03 am 
Offline
Forum Members
Forum Members

Joined: Mon Dec 27, 2010 12:05 am
Posts: 10
Witam szukałem i czytałem większość tematów związanych z przyjaznymi url, lecz dalej nie moge tego zrobic.

Obecnie linki wyglądają tak:
\$1:
http://adres.com/index.php?page=firma

a chciałbym żeby wyglądały tak:
\$1:
http://adres.com/firma.html
lub
http://adres.com/firma


Korzystam z wersji cmsms 1.6.9 , robiłem wszystko według instrukcji bez żadnych rezultatów, chciałbym was prosić o szczegóły a nawet gotowy kod z config.php oraz .htaccess tak by to zadziałało. już naprawde sie zgubiłem w tym wszystkim i nie mam już pomysłów jak to zrobić.

Z góry dzieki


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: przyjazne URL - pomoc
PostPosted: Wed Nov 09, 2011 11:31 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Sat Nov 01, 2008 11:52 am
Posts: 41
Wprowadź na swoją stronę do config.php:
\$1:
$config['url_rewriting'] = 'mod_rewrite'; // this is new from 1.6
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true; // no longer in the config file
$config['query_var'] = 'page';


Do pliku .htaccess:

\$1:
# BEGIN Optional settings

# Turns off directory browsing
# not absolutely essential, but keeps people from snooping around without
# needing empty index.html files everywhere
Options -Indexes

# Deny access to config.php
# This can be useful if php ever breaks or dies
# Use with caution, this may break other functions of CMSms that use a config.php
# file.  This may also break other programs you have running under your CMSms
# install that use config.php.  You may need to add another .htaccess file to those
# directories to specifically allow config.php.
<Files "config.php">
order allow,deny
deny from all
</Files>

# Sets your 403 error document
# not absolutely essential to have,
# or you may already have error pages defined elsewhere
ErrorDocument 403 /forbidden403.shtml

# No sense advertising what we are running
ServerSignature Off

# END Optional Settings

# BEGIN CMSMS and Rewrite Rules
# Make sure you have Options FollowSymLinks
# and Allow on

RewriteEngine On

# Might be needed in a subdirectory
#RewriteBase /

# URL Filtering helps stop some hack attempts
#IF the URI contains a "http:"
RewriteCond %{QUERY_STRING} http\: [OR]
#OR if the URI contains a "["
RewriteCond %{QUERY_STRING} \[ [OR]
#OR if the URI contains a "]"
RewriteCond %{QUERY_STRING} \] [OR]
#OR if the URI contains a "<__script__>"
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
#OR script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
#OR any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^.*$ - [F,L]
# END Filtering

# CMSMS Rewriting
# Set assume mod_rewrite to true in config.php and clear CMSMS cache
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
# END CMSMS

# END Rewrite rules


Opis zmian znajdziesz tutaj:
http://wiki.cmsmadesimple.org/index.php/User_Handbook/Installation/Optional_Settings


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  [ 2 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:  
A2 Hosting