Results 1 to 12 of 12
  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,517
    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
    Member
    Join Date
    Sep 2020
    Posts
    49
    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,528
    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,204
    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,200
    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
    15
    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!

  9. #9
    Junior Member
    Join Date
    Aug 2021
    Posts
    20
    I will create a php file with the code "phpinfo();", and then visit this file with browser, and check the loaded Modules section.
    Rapid Prototype Manufacturing | CNC Aluminum Prototype |Sheet Metal Prorotype | Low-Volume Production | Injection Molding | Die Casting | Medical Device Prototyping | Polyurethane Vacuum Casting | Automotive Industry Prototyping

  10. #10
    Registered User
    Join Date
    Mar 2021
    Posts
    15
    Quote Originally Posted by Ryan Cao View Post
    I will create a php file with the code "phpinfo();", and then visit this file with browser, and check the loaded Modules section.
    How do you do the verification?

  11. #11
    Registered User
    Join Date
    Aug 2021
    Posts
    3
    That is how you verify it. When you load the file in your browser you will see the loaded modules section.
    This link seems to explain it nicely which I found on google: https://shyammakwana.me/server/2-way...e-modules.html
    Hostking| Since 2013 | South Africa | India
    Domains • Shared • Reseller • VPS • Backups • cPanel

  12. #12
    Junior Member
    Join Date
    Sep 2021
    Posts
    3
    You can check from SSH:
    Code:
    apachectl -M | grep rewrite

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.