skip to Main Content

I redirected my controllers to lowercase in .htaccess, but after redirecting to lowercase I am getting error as shown below.

enter image description here

My Controllers file name is: Seo_Services.php

My routes.php file declaration is:

    $route['seo-services'] = 'Seo_Services';

Note: This works on localhost. Not working on Godaddy hosting panel.

Please Help!

Edited:
Note: To make it more clear, I just want my url to be lowercase.

Working: https://immacbytes.com/Seo-Services

Not Working: https://immacbytes.com/seo-services

2

Answers


  1. Chosen as BEST ANSWER

    I just knew that my web.config is wrong. I was passing a rule to redirect Seo-Services to seo-services. Rule is shown below:

    <rule name="bfgfgg-fgfg-g-ff" stopProcessing="true">
        <match url="Seo-Services" />
        <action type="Redirect" url="seo-services" />
    </rule>
    

    May be the web.config rule are not case sensitive. So this rule was getting triggered again & again. In result I was getting error.

    Thanks!


  2. Codeigniter Controller Example and naming conventions

    <?php
    class Blog extends CI_Controller {
    
            public function index()
            {
                    echo 'Hello World!';
            }
    }
    

    The file must be called ‘Blog.php’, with a capital ‘B’.

    Class names must start with an uppercase letter.

    This is valid:

    <?php
    class Blog extends CI_Controller {
    
    }
    

    This is not valid:

    <?php
    class blog extends CI_Controller {
    
    }
    

    Please check and revert.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search