Htaccess [SOLVED]: Is all web hosting servers support rewrite engine in apache?

Htaccess [SOLVED]: Is all web hosting servers support rewrite engine in apache?

Home Forums htaccess Htaccess [SOLVED]: Is all web hosting servers support rewrite engine in apache?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36967

    Anonymous

    QuestionQuestion

    I am new to Codeigniter.

    Now i developed one project in codeigniter and i want to live it soon

    That is not a matter but while i started to develop the site i were want to remove index.php from the url of codeigniter. For that i need to write formula in .htaccess to mod rewrite apache engine. I have enabled mod rewrite engine mode on my local server manually.

    It was worked and i was developed the project.But

    When i goes to live i having doubt, Is all web hosting servers are allows mod rewrite apache engine or not?

    If not how can i live my site??

    Can anyone ans my quistion to help me????

    #36968

    Anonymous

    Accepted AnswerAnswer

    mod_rewrite is usually enabled but it’s good to confirm it. If the live server is running Apache the loaded modules can be determined with the PHP function apache_get_modules().

    Create a simple controller – Mod_test.php

    class Mod_test extends CI_Controller
    {
        public function index()
        {
             var_dump(apache_get_modules());
        }
    }
    

    Upload the file to the live server (in the controllers folder) and direct the browser to

    http://yoursite.com/index.php/mod_test
    

    Look for the string ‘mod_rewrite’ in the resulting output.

    If it isn’t there you should contact the host provider to see if the mod can be enabled.

    Be sure to delete this controller when you have got your answer.

    Source: https://stackoverflow.com/questions/48022618/is-all-web-hosting-servers-support-rewrite-engine-in-apache
    Author: DFriend
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.