SEO URL v CMS made simeple? Topic is solved

Česká/Slovenská podpora pro CMS Made Simple
Post Reply
Cody

SEO URL v CMS made simeple?

Post by Cody »

Víte někdo jak změnit URL z /index.php?page=kolekce-2009 změnit na /kolekce-2009?
Cody

Re: SEO URL v CMS made simeple?

Post by Cody »

Díky moc, mám s tím trošku problém, sice to funguje ale ne úplně dobře. Mám toto nastavení:

config.php

Code: Select all

#------------
#URL Settings
#------------

#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = true;

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '/';

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism?  This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = true;

#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'] = true;

#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'] = 'studiobrigit';
.htaccess

Code: Select all

Options +FollowSymLinks
RewriteEngine on
RewriteBase /

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# protoze pouzivam priponu /, tak chci aby vse takovou priponu melo.
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
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
#toto je aktualni rewrite z nice url(http://www.mysite.com/rodic/rodic/stranka/), aby se to zoobrazilo
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
URL to hezky změní, ale bohužel každý odkaz směřuje na index. Rewritu moc nerozumím, ale nejspíš bude problém tam dokážete někdo poradit?
kino

Re: SEO URL v CMS made simeple?

Post by kino »

Code: Select all

$config['query_var'] = 'studiobrigit';
bud studiobrigit zmen na page(soubor config.php)

NEBO

Code: Select all

RewriteRule ^(.+)$ index.php?page=$1 [QSA]
page na studiobrigit(soubor .htaccess)

Zmen pouze jedno z techto moznosti.
Cody

Re: SEO URL v CMS made simeple?

Post by Cody »

Super, děkuju moc funguje!
Post Reply

Return to “Czech/Slovak - Česky/Slovensky”