LE: Figured out that my explaining skills are quite bad so I will make a quick to subject tl;dr at the end.
I recently received a project which implies the customisation of a website build on CMSMS (CMS Made Simple). The website version is 1.11.2 and I am using Apache and mod_rewrite in order to deal with the url rewrite. I've been trying to solve one small thing related to URL Rewrite but I simply cannot get past it.
The website has installed a module for blog, CGBlog. In order to display the content of the blog, I need a page (and a template for the page but we will keep the template out of the discussion because it was no deal in the issue) where to spill all the posts. Basically, a general category/archive page. Thus I created a page called 'Blog' with the URL 'blog'. So far, not taking the blog into account, we would have something like example.com/blog.
The blog has an option to add a prefix before every post. So I can make something like example.com/any_prefix_here/title-of-post. Also when inside a blog post it will not keep account for how the archive/category page is called. So I ve been using this prefix option to make the url look the same. Ex: example.com/blog and when inside an article example.com/blog(added as a prefix)/title-of-the-post.
Now, the problem is if I try to keep the name of the page of the blog called 'blog' I cannot access it as example.com/blog or I will get 403 forbidden. If I acces it via example.com/anything/blog it will work. If I name the page blog2 then I can access it as example.com/blog2. I can't figure out what's the deal with 'blog', as the word. Also I cannot figure out how to bypass the 403 forbidden.
I even tried to rewrite it somehow via .htaccess but without success.
This is my htaccess at the moment.
# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off
# (this is important, so uncomment if your host permit)
Options -Indexes
ServerSignature Off
Options +FollowSymLinks
# To prevent E_STRICT problems with PHP 5.3+ you can uncomment the following lines
# Note: These settings should only be enabled for production sites!
#php_flag display_startup_errors 0
#php_flag display_errors 0
#php_flag html_errors 0
#php_value docref_root 0
#php_value docref_ext 0
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# redirects /index.php?page=asfd to /asdf
RewriteCond %{THE_REQUEST} /index\.php\?page=([^\s&]+) [NC]
RewriteRule ^ /%1? [R=302,L,NE]
# redirects /index.php/asfd to /asdf
RewriteCond %{THE_REQUEST} /index\.php/([^?\s]+)\s [NC]
RewriteRule ^ /%1 [R=302,L,NE]
RewriteCond %{THE_REQUEST} ^.*/index\.php
RewriteRule ^(.*)index.php$ /$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA,L]
RewriteCond %{HTTP_HOST} ^connsys.ro
RewriteRule (.*) http://www.connsys.ro/$1 [R=301,L]
</IfModule>
<IfModule mod_header.c>
# Disable ETags
Header unset ETag
FileEtag None
</IfModule>
<IfModule mod_deflate.c>
# Compress css, plaintext, xml, gif, and images in transport.
AddOutputFilterByType DEFLATE text/css text/plain text/xml image/gif image/jpeg image/png
</IfModule>
<IfModule mod_expires.c>
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
# Set expires tags on various files... so that the browser wont attempt to reload them.
ExpiresActive On
ExpiresDefault "access plus 1 year"
<IfModule mod_header.c>
# Setting cache control to public allowes proxy servers to cache the items too.
Header set Cache-Control "public"
</IfModule>
</FilesMatch>
</IfModule>
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
# Or, compress certain file types by extension:
<files *.html>
SetOutputFilter DEFLATE
</files>
<IfModule mod_headers.c>
# WEEK
<FilesMatch "\.(jpg|jpeg|png|gif|swf|woff)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
</IfModule>
Tl;dr: url rewrite problem/permission problem to the blog page. Page is called 'Blog' and slug/url is 'blog'. I cannot access blog as example.com/blog as I get 403 forbidden. If I access the blog as example.com/anything/blog it works. If I rename the page to blog2 it works as example.com/blog2.
How should I approach this issue? I'd be grateful if you would not downvote and tell me what I did wrong in case I explained something wrong.
Thank you
Is there a real directory called blog
? With either no index file/auto-indexing disabled, or with incorrect permissions?