Pretty URL

La discusión del CMS Made Simple en español.

Moderator: hexdj

Post Reply
Sakrow
Forum Members
Forum Members
Posts: 23
Joined: Wed Jun 23, 2010 7:05 pm

Pretty URL

Post by Sakrow »

Llevo tiempo intentando hacer lo de las Pretty URL, pero no lo consigo, he leído cosas en este foro y en manuales de CMSMS, pero parece ser que algo hago mal y no doy con que es.

Estas son mis configuraciones:

Config.php:

Code: Select all

#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.
  $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'] = 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'] = 'page';
Y este mi .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
  # except for form POSTS
  RewriteCond %{REQUEST_URI} !/$
  RewriteCond %{REQUEST_URI} !\.
  RewriteCond %{REQUEST_METHOD} !POST$
  RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
  RewriteRule ^News/rss(.+)$ index.php?page=News/rss$1 [S=1]

  # 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]
Puedo entrar a la pagina principal (con extensión .php) pero a las demás me sale error 404 not found, pero si pongo index.php?=galeria si que entra a la pagina.
Post Reply

Return to “Spanish - Español”