rename index.php and working with CI CMS?

[eluser]Zeeshan Rasool[/eluser]
hi all CI lovers..
i've a problem. i need to put cms that is in CI and my site that is developed in plain php
so im using same folder in which i put my system folder and my site's pages etc. So how can i use same .htaccess so that when i give it loads cms and if i use then it loads my site.

RewriteEngine on
Options +FollowSymLinks
Options -Indexes
DirectoryIndex admin.php

RewriteCond $1 !^(admin\.php|tmp|images|css|js|robots|css|tiny_mce|images|cms_js\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ admin.php?$1 [L,QSA]

RewriteRule ^index.html$ index.php
RewriteRule ^my-studio.html$ my-studio.php?p=my-studio
in cms case it loads cms but site cant' be accessed

[eluser]Phil Sturgeon[/eluser]
Just put cms into the first RewriteCond

Quote:RewriteCond $1 !^(admin\.php|cms|tiny_mce|cms_js\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ admin.php?$1 [L,QSA]

Means it will not try and match anything starting with "cms" to CodeIgniter.

Btw, I took out lots of the first line as it wasn't required. They match against real files so the 2nd and 3rd conditions pick that up. No point in having it check 11 things EVERY request that is made.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.