[Résolu] Problème d'url

Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
#1
Citation :#~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~
#~ Version du CMS : 1.6.7
#~ Version du MLE si existante : non
#~ Informations Système :
#~ Cms Version: 1.6.7
#~ Installed Modules:
#~ CMSMailer: 1.73.14
#~ FileManager: 1.0.2
#~ MenuManager: 1.6.2
#~ ModuleManager: 1.3.2
#~ News: 2.10.4
#~ nuSOAP: 1.0.1
#~ Printing: 1.0.4
#~ Search: 1.6.1
#~ ThemeManager: 1.1.1
#~ TinyMCE: 2.6.2
#~ Config Information:
#~ php_memory_limit:
#~ process_whole_template: false
#~ max_upload_size: 64000000
#~ default_upload_permission: 664
#~ assume_mod_rewrite: true
#~ page_extension: .html
#~ internal_pretty_urls: false
#~ use_hierarchy: true
#~ Php Information:
#~ phpversion: 4.4.9
#~ md5_function: On (Vrai)
#~ gd_version: 2
#~ tempnam_function: On (Vrai)
#~ magic_quotes_runtime: Off (Faux)
#~ memory_limit: 64M
#~ max_execution_time: 30
#~ safe_mode: Off (Faux)
#~ session_save_path: /tmp (1777)
#~ session_use_cookies: On (Vrai)
#~ Server Information:
#~ Server Api: cgi
#~ Server Db Type: MySQL (mysql)
#~ Server Db Version: 5.0.90
#~ ----------------------------------------------
#~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~
Bonjour,

J'ai bien lu les différents article et post sur le sujet, mais je dois avouer que je bloque sur la réécriture d'url.

J'ai modifié le fichier config.php comme ceci :
Code :
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
Et le fichier .htaccess comme cela :
Code :
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]

  # 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 ^(.+).htm$ index.php?page=$1 [QSA]
Les pages chargées sont bien du type : domaine/dossier/page1
Mais elles renvoient une erreur 404.

Par contre les pages du type : domaine/index?page=page1
Elles sont accessibles.

J'ai bien vidé le cache via l'administration.
Quelqu'un saurait-il où je me suis trompée ?

Merci d'avance.
#1
Citation :#~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~
#~ Version du CMS : 1.6.7
#~ Version du MLE si existante : non
#~ Informations Système :
#~ Cms Version: 1.6.7
#~ Installed Modules:
#~ CMSMailer: 1.73.14
#~ FileManager: 1.0.2
#~ MenuManager: 1.6.2
#~ ModuleManager: 1.3.2
#~ News: 2.10.4
#~ nuSOAP: 1.0.1
#~ Printing: 1.0.4
#~ Search: 1.6.1
#~ ThemeManager: 1.1.1
#~ TinyMCE: 2.6.2
#~ Config Information:
#~ php_memory_limit:
#~ process_whole_template: false
#~ max_upload_size: 64000000
#~ default_upload_permission: 664
#~ assume_mod_rewrite: true
#~ page_extension: .html
#~ internal_pretty_urls: false
#~ use_hierarchy: true
#~ Php Information:
#~ phpversion: 4.4.9
#~ md5_function: On (Vrai)
#~ gd_version: 2
#~ tempnam_function: On (Vrai)
#~ magic_quotes_runtime: Off (Faux)
#~ memory_limit: 64M
#~ max_execution_time: 30
#~ safe_mode: Off (Faux)
#~ session_save_path: /tmp (1777)
#~ session_use_cookies: On (Vrai)
#~ Server Information:
#~ Server Api: cgi
#~ Server Db Type: MySQL (mysql)
#~ Server Db Version: 5.0.90
#~ ----------------------------------------------
#~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~
Bonjour,

J'ai bien lu les différents article et post sur le sujet, mais je dois avouer que je bloque sur la réécriture d'url.

J'ai modifié le fichier config.php comme ceci :
Code :
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
Et le fichier .htaccess comme cela :
Code :
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]

  # 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 ^(.+).htm$ index.php?page=$1 [QSA]
Les pages chargées sont bien du type : domaine/dossier/page1
Mais elles renvoient une erreur 404.

Par contre les pages du type : domaine/index?page=page1
Elles sont accessibles.

J'ai bien vidé le cache via l'administration.
Quelqu'un saurait-il où je me suis trompée ?

Merci d'avance.
#2
Une petite modification dans le .htaccess et le problème est réglé :
Code :
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]

  # 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 ^(.+).htm$ index.php?page=$1 [QSA]
#2
Une petite modification dans le .htaccess et le problème est réglé :
Code :
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]

  # 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 ^(.+).htm$ index.php?page=$1 [QSA]


Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)