1

I've developed CMS in Codeigniter which is working find on localhost on every aspect I mean I can access my client and admin using URL's on localhost but I've hosted my application on domain where I can access only main page of my CMS but on every other url it says : Not Found : The requested document was not found on this server. please consider my configurations and advice accordingly entries from config.php

$config['base_url'] = '';
$config['index_page'] = '';

my .htaccess file below

<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /cicms
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule> 

routes.php

$route['default_controller'] = "page";
$route['404_override'] = 'page';
//$route['(:any)'] = "page/$1";
$route['user/(:any)'] = 'user/index/$1';
$route['article/(:num)/(:any)'] = 'article/index/$1/$2';

my folder stucture is given below

cicms
.htaccess
application
    controller
        admin 
            page
            user
            dashboard
            etc
        page  //cleint
        article //client    

now on live server when i access abc.com/cicms it gives me the page controller but there are other tabs for different pages which gives me document not found error and if I try to access the admin panel like abc.com/cicms/admin/user/login it gives me document not found error P:S my login view exist I am sure please advice and one more thing everything is workging perfectly on localhost

Hassan
  • 303
  • 2
  • 8
  • 25
  • Is mod_rewrite installed and enabled on your server? Did you try with "abc.com/index.php/cicms/admin/user/login"? – Maxime Morin Apr 23 '14 at 17:09
  • how to test that mod_rewrite is enabled on the server – Hassan Apr 23 '14 at 20:16
  • [Did](http://stackoverflow.com/questions/9021425/how-to-check-if-mod-rewrite-is-enabled-in-php) [you](http://stackoverflow.com/questions/7337724/how-to-check-whether-mod-rewrite-is-enable-on-server) [search](http://serverfault.com/questions/397168/how-to-i-test-if-mod-rewrite-is-enabled)? – Maxime Morin Apr 23 '14 at 20:42
  • yes mod_rewrite is enabled on the server – Hassan Apr 24 '14 at 06:32
  • yes I tried the URL you mentioned and get the following resulting URL only "abc.com/index.php/cicms/admin/user/home/home/home/home/home/home/home/home/home/home/home/home/home/home/home/home/home/home/home/home/home/" – Hassan Apr 24 '14 at 07:15
  • @MaximeMorin abc.com/cicms/ which displays my homepage I've other tabs on my menu and hovering the mouse on it gives me the following links abc.com/cicms/about abc.com/cicms/contact Not Found The requested document was not found on this server. and on localhost these links works perfectly localhost/cicms/about localhost/cicms/contact and yes my admin panel which I should access via given link does not work at all giving the same not found message abc.com/cicms/admin/user/login where admin is sub-directory and "user" is controller name what do you suggest now as you have all the details – Hassan Apr 24 '14 at 07:54
  • @MaximeMorin waiting for ur response – Hassan Apr 24 '14 at 18:43

1 Answers1

2

actually I hosted my site on paraller plesk and it does not use apache instead they use IIS so there is no use of .htaccess file instead we need a web.config file on the root here is my web.config and its working for all of my projects hosted on parallel plesk

<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<system.webServer>

    <httpErrors errorMode="Detailed" />
    <asp scriptErrorSentToBrowser="true"/>

    <rewrite>
    <rules>
        <rule name="RuleRemoveIndex" stopProcessing="true">
            <match url="^(.*)$" ignoreCase="false" />
            <conditions>
                <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true"/>
        </rule>
    </rules>
    </rewrite>

</system.webServer>

<system.web>
    <customErrors mode="Off"/>
    <compilation debug="true"/>
</system.web>

</configuration>
Hassan
  • 303
  • 2
  • 8
  • 25