2014-06-15, 04:11:27
Change "index.php?id=blog" to "index.php?id=works"
move the 5 lines to between "RewriteBase /" and "RewriteCond %{REQUEST_FILENAME} !-f"
Your .htaccess file should now look like
move the 5 lines to between "RewriteBase /" and "RewriteCond %{REQUEST_FILENAME} !-f"
Your .htaccess file should now look like
Code:
#
# GetSimple CMS htaccess ROOT file
# apache 2.4
#
# The following require certain allow overrides, if getting 500 error comment them out one by one
# can be resolved in apache httpd.conf to ensure security alternatives
# override charset
AddDefaultCharset UTF-8
# prevent directory listings
Options -Indexes
# Follow symbolink links, This is required for rewrites on some hosts
Options +FollowSymLinks
# Set the default handler.
DirectoryIndex index.php
# blocks direct access to the XML files - they hold all the data!
<Files ~ "\.xml$">
<IfModule !mod_authz_core.c>
Deny from all
</IfModule>
<IfModule mod_access_compat.c>
Deny from all
</IfModule>
<IfModule mod_authz_core.c>
<IfModule !mod_access_compat.c>
Require all denied
</IfModule>
</IfModule>
</Files>
<Files sitemap.xml>
<IfModule !mod_authz_core.c>
Allow from all
</IfModule>
<IfModule mod_access_compat.c>
Allow from all
</IfModule>
<IfModule mod_authz_core.c>
<IfModule !mod_access_compat.c>
Require all granted
</IfModule>
</IfModule>
</Files>
# handle rewrites for fancy urls
<IfModule mod_rewrite.c>
RewriteEngine on
# Usually RewriteBase is just '/', but
# replace it with your subdirectory path
RewriteBase /
RewriteRule ^works/post/([^/.]+)/?$ index.php?id=works&post=$1 [L]
RewriteRule ^works/tag/([^/.]+)/?$ index.php?id=works&tag=$1 [L]
RewriteRule ^works/page/([^/.]+)/?$ index.php?id=works&page=$1 [L]
RewriteRule ^works/archive/([^/.]+)/?$ index.php?id=works&archive=$1 [L]
RewriteRule ^works/category/([^/.]+)/?$ index.php?id=works&category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
</IfModule>
Check out my website: JohnStray.com