Results 1 to 8 of 8
  1. #1
    Registered User brainpulse's Avatar
    Join Date
    Jan 2010
    Location
    Noida
    Posts
    445

    Lightbulb How to check Mod_Rewrite is enabled or not ?

    i make .htaccess file but it is not functioning.
    So i have one question how i can check at my server Mod_Rewrite is enabled / disabled ?

    welcome all suggestion.......

  2. #2
    Member
    Join Date
    Dec 2017
    Location
    Santa Clara, California, USA
    Posts
    70
    ⦁ To check if the mod_rewrite module is enabled, create a new PHP file in the root folder of your WAMP server. Enter the following
    phpinfo();
    ⦁ Access your created file from your browser.
    ⦁ Ctrl+F to open a search. Search for 'mod_rewrite'. If it is enabled you see it as 'Loaded Modules'
    ⦁ If not, open httpd.conf (Apache Config file) and look for the following line.
    #LoadModule rewrite_module modules/mod_rewrite.so
    ⦁ Remove the pound ('#') sign at the start and save the this file.
    ⦁ Restart your apache server.
    ⦁ Access the same php file in your browser.
    ⦁ Search for 'mod_rewrite' again. You should be able to find it now.

  3. #3
    Senior Member
    Join Date
    Aug 2020
    Posts
    1,086
    In PHP, there is an inbuilt function called 'phpinfo'. By using this function, we can output all the Loaded Modules and see the 'mod_rewrite' is enabled or not. Syntax: phpinfo();

  4. #4
    Junior Member
    Join Date
    Sep 2020
    Posts
    21
    First thing you have to learn is about mod_rewrite, for that you can check here

    Best and easy method is to upload phpinfo.php file and add "phpinfo();" function in it.
    But there is another method "apache_get_modules" and you can add below code in new created file.
    <?php
    print_r(apache_get_modules());
    ?>

    But one thing you have to keep in your mind that this module will only work if PHP is running as an Apache module.

  5. #5
    Registered User
    Join Date
    Nov 2019
    Posts
    2,416
    To check if mod_rewrite module is enabled, create a new php file in your root folder of your WAMP server. ...
    Access your created file from your browser.
    Ctrl F to open a search. ...
    If not, open httpd. ...
    Remove the pound ('#') sign at the start and save the this file.
    Restart your apache server.

  6. #6
    Senior Member
    Join Date
    Aug 2020
    Posts
    1,080
    Open any web browser browser and type following the URL, 'localhost/check. php'. It will display the PHP version details and Apache Configuration. In Apache Configuration, search for the Loaded Modules section, and there you will find all the modules that are enabled.

  7. #7
    Senior Member
    Join Date
    Aug 2020
    Posts
    1,082
    Open your website root directory, create a php file mod_rewrite.php: Add the following line of code to it: ? Create . Add the following content to the file: RewriteEngine On RewriteRule ^.*$ mod_rewrite.php. Open your site. Make sure to delete the .

  8. #8
    Registered User
    Join Date
    Mar 2021
    Posts
    5
    Quote Originally Posted by jayammrg View Post
    Open any web browser browser and type following the URL, 'localhost/check. php'. It will display the PHP version details and Apache Configuration. In Apache Configuration, search for the Loaded Modules section, and there you will find all the modules that are enabled.
    Thank you so much for the detailed instructions!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.