.htaccess file
Hey guys, I forgot that the .htaccess file isn’t included in the zip…
So here’s a copy of it:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Add Trailing Slash (Force it!) - It looks cool :) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*)$ http://cms.dev/$1/ [R=301,L] # Admin 'dashboard' RewriteRule ^admin$ index.php/admin [L] RewriteRule ^admin/$ index.php/admin/ [L] # Admin functions within Admin module and controller RewriteRule ^admin/(navigation|users|settings|login|logout)$ index.php/admin/$1 [L] RewriteRule ^admin/(navigation|users|settings|login|logout)/(.*)$ index.php/admin/$1/$2 [L] RewriteRule ^admin/nav_(.*)$ index.php/admin/nav_$1 [L] # All others, push to the module in question RewriteRule ^admin/([a-zA-Z]*)$ $1/admin [L] RewriteRule ^admin/([a-zA-Z]*)/(.*)$ $1/admin/$2 [L] # Any request were the file or directory doesn't exist... # Push to CI RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>
If you enjoyed this post, make sure you subscribe to the RSS feed!
Hi Elliot
First of all Thanks for you videos they very good for teaching pls do some more…
I am getting 404 pages with cms i have checked config, routing, .hta but i am having 404 pages what can be the problem ?
Thanks for all
Regards
Barzo
i think this is sending me to 404 pages…
redirect(’admin/login’);
Hey…
Have you checked your RewriteBase?
Is anyone else having this issue?
Thanks Elliot.
All work fine for me
Regards
phpwebdev
Yes i did
You can see it
RewriteEngine On
RewriteBase /blaze/
# Add Trailing Slash (Force it!) - It looks cool
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://localhost/blaze/index.php/1/ [R=301,L]
# Admin ‘dashboard’
RewriteRule ^admin$ index.php/admin [L]
RewriteRule ^admin/$ index.php/admin/ [L]
# Admin functions within Admin module and controller
RewriteRule ^admin/(navigation|users|settings|login|logout)$ index.php/admin/$1 [L]
RewriteRule ^admin/(navigation|users|settings|login|logout)/(.*)$ index.php/admin/$1/$2 [L]
RewriteRule ^admin/nav_(.*)$ index.php/admin/nav_$1 [L]
# All others, push to the module in question
RewriteRule ^admin/([a-zA-Z]*)$ $1/admin [L]
RewriteRule ^admin/([a-zA-Z]*)/(.*)$ $1/admin/$2 [L]
# Any request were the file or directory doesn’t exist…
# Push to CI
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Hi Elliot,
Thanks for sharing this CMS can’t wait for your updates.
By the way is there easiest way to install the CMS in local computer? I managed to install locally but have problems with .htaccess or file not found. But when i moved to live server everything works ok.
Cheers!
hi,
nice work, but where i have to but the htaccess file? thanks
Some changes in .htaccess (which included in latest release):
We have:
RewriteRule ^(.*)$ http://cms.dev/1/ [R=301,L]
Must be:
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]