Archives du mot-clé htaccess

config.php .htaccess CMSms

RewriteEngine On
RewriteBase /

#www erzwingen unter Vermeidung doppelten Contents
RewriteCond %{HTTP_HOST} !^www\.meinedomain\.de$ [NC]
RewriteRule ^(.*)$ http://www.meinedomain.de/$1 [R=301,L]

# Regel fuer Umleitung (301) von Anfragen ohne . oder abschliessenden /
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [NE,R=301,L]

# Regeln Umleitungen der Seiten-Aliase
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

viaVerbesserte config.php und .htaccess für CMSms ab Version 1.11.x (Seite 1) / Installation und Einstellungen / Info-Portal deutschsprachiger CMSMS-Anwender.

Publicités

Using .htaccess to block …

  1. How to block users from accessing your site based on their IP address
  2. How to prevent or allow directory listing?
  3. How to change the error documents – 404 Page Not Found, etc
  4. Using .htaccess for password protecting your folders
  5. Using .htaccess to block referrer spam
  6. Disable Hot-Linking of images and other files
  7. Redirect URLs using .htaccess
  8. Introduction to mod_rewrite and some basic examples
  9. Force SSL/https using .htaccess and mod_rewrite
  10. 301 Permanent redirects for parked domain names
  11. Enable CGI, SSI with .htaccess
  12. How to add Mime-Types using .htaccess
  13. Change default directory page
  14. Block Bad robots, spiders, crawlers and harvesters
  15. Make PHP to work in your HTML files with .htacess
  16. Change PHP variables using .htaccess
  17. HTTP Authentication with PHP running as CGI/SuExec
  18. Force www vs non-www to avoid duplicate content on Google
  19. Duplicate content fix index.html vs / (slash only)

 

Internal Server Error et htaccess – Forum OVH

Apache/PHP/Drupal settings:

instructions très intéressantes, bien expliquées

via Internal Server Error et htaccess – Forum OVH.

Par exemple :

SetEnv PHP_VER 5
SetEnv REGISTER_GLOBALS 0

ErrorDocument 404 /index.php

# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
# There is no end quote below, for compatibility with Apache 1.3.
ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>

# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
RewriteCond %{HTTP_HOST} ^exemple\.fr$ [NC]
RewriteRule ^(.*)$ http://www.exemple.fr/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

 

Réécriture d’URL

Foirage dans la réécriture d’URL.

La génération d’un menu, quoique apparemment correcte, ne permettait pas d’afficher les pages filles après réécriture. L’alias d’une page « parent » était en cause puisque une fois modifié, celui-ci ne posait plus de problème.

 

En fait, des pages statiques, au format .HTML avaient la même adresse. Ce qui provoquait confusion sur le serveur, celui-ci étant incapable d’afficher la page correspondante.