- Code: Select all
AddHandler application/x-httpd-php5 .php
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteRule \.(css|jpe?g|gif|png)$ - [L]
RewriteCond %{REQUEST_URI} ^/[^\.]+[^/]$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]
RewriteRule ^([^/\.]+)/?$ /index.php?page=$1 [QSA,L]
RewriteRule ^([^/\.]+)/([^/\.]+)/?$ /index.php?section=$1&page=$2 [QSA,L]
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /index.php?section=$1&subsection=$2&page=$3 [QSA,L]
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /index.php?section=$1&subsection=$2&page=$3&cat=$4 [QSA,L]
Somehow, since I really don't think I'll understand this mod_rewrite stuff, my site allows for the folllowing real subdirectory.
http://www.mydomain.com/forum/
In all other cases it allows for my database driven content, like
http://www.mydomain.com/user/username/
or
http://www.mydomain.com/nation/belgium/
where user and nation, of course, are not real directories.
Now, I'm wanting to add a blog to my site, which I've put at the following location:
http://www.mydomain.com/blog/
Unfortunately, the .htaccess is interpreting the blog part as a fictional directory, and as a result I'm not seeing my blog.
Where do I begin on fixing this?