• 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  [ 3 posts ] 
Author Message
 Post subject: Problém s pretty URL
PostPosted: Fri Oct 12, 2012 10:56 am 
Offline
Forum Members
Forum Members

Joined: Fri Mar 05, 2010 10:54 am
Posts: 19
Zdravím, mám problém s pretty url. Už jsem to několikrát rozchodil ale nyní mi to nejde nebo spíše to není jak bych chtěl.

V url vidím http://www.domena.cz/?page=fotogalerie/

Pokud do url zadám http://www.domena.cz/fotogalerie/
tak se stránka zobrazí taky ale url se zase přehodí na http://www.domena.cz/?page=fotogalerie/

Jak to můžu změnit aby se mi při překlikávání zobrazovalo jen /fotogalerie/?

verze CMS 1.10.3 "Hyacinthe"


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Problém s pretty URL
PostPosted: Fri Oct 12, 2012 2:42 pm 
Offline
Forum Members
Forum Members

Joined: Wed Mar 16, 2011 9:13 am
Posts: 206
pokial budes mat takyto htaccess v roote (CMS je instalovane v roote)
\$1:
# 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

#option to remove directory listings in all folder (avoid publishing unwanted contents)
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>


# No sense advertising what we are running
ServerSignature Off

# HTTP response header forced to be "Server: Apache" only
# Sometimes this istruction must be saved inside httpd.conf or apache.conf or sites-enabled instead of .htaccess

#
#Sub-dir e.g: /cmsms
RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.domena\.cz [NC]
RewriteRule ^(.*)$ http://www.domena.cz/$1 [L,R=301]

# 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>


a v config.php budes mat okrem ostatneho aj toto tak by to malo fungovat ako má

\$1:
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '/';
$config['query_var'] = 'page';


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Problém s pretty URL
PostPosted: Mon Oct 15, 2012 7:59 am 
Offline
Forum Members
Forum Members

Joined: Fri Mar 05, 2010 10:54 am
Posts: 19
Díky, už vím co dělalo ten problém. Je tedy k něčemu toto následující:


\$1:
RewriteRule ^index.php http://www.domena.cz/ [R=301,L]
RewriteRule ^index.html http://www.domena.cz/ [R=301,L]
RewriteRule ^index.apsx http://www.domena.cz/ [R=301,L]
RewriteRule ^index.aps http://www.domena.cz/ [R=301,L]
RewriteRule ^index.htm http://www.domena.cz/ [R=301,L]


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  [ 3 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