How I created my website

From Wiki

Jump to: navigation, search

my .htaccess file:

# Treat all files ending with .php as files to be processed as PHP5 code through my web hosters web server configuration.
AddType x-mapp-php5 .php
Options +FollowSymLinks
# Enable the rewrite mechanism
RewriteEngine on
# if the host name part of the URL equals 'danyelceccaldi.com' (without the 'www.')
# [NC] ignores the case of the compared pattern
RewriteCond %{HTTP_HOST} ^danyelceccaldi.com [NC]
# then use the URI path characters (everything behing the '/' after the hostname)
# and redirect permanently (R=301) to the URL
# http://www.danyelceccaldi.com/(there comes the URI path characters) 
# [L] means no further rewrite processing
RewriteRule ^(.*)$ http://www.danyelceccaldi.com/$1 [L,R=301]
# Redirect permanently (301) a URL with an empty URI to the '/wiki/' URI
RedirectMatch 301 ^/$ http://www.danyelceccaldi.com/wiki/
# if the request URI is '/wiki'
# [NC] ignores the case of the compared pattern
RewriteCond %{REQUEST_URI} ^/wiki$ [NC]
# then permanently redirect to the entry URI '/wiki/index.php?title=Main_Page'
# [L] means no further rewrite processing
RewriteRule ^(.*) /wiki/index.php?title=Main_Page [L,R=301]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^wiki/(.*) wiki/index.php?title=$1 [PT,L,QSA]

Some of my LocalSettings.php entries:

# assemble article path differen
$wgServer = "http://www.danyelceccaldi.com";
$wgArticlePath = "/wiki/$1";

See also [Short URL].

Personal tools