3

I recently hosted my website in shared hosting the sites mod_rewrite is not working. I there anything I have to add in php.ini file to enable the mod_rewrite option in php.ini file.

sandip
  • 3,279
  • 5
  • 31
  • 54
vinoth
  • 471
  • 3
  • 7
  • 14
  • 1
    mod_rewrite cannot be enabled via php.ini. If mod_rewrite module is enabled/loaded on a server, then "activate" it in .htaccess via `RewriteEngine On`. Alternatively you will have to implement URL routing using PHP itself (check how popular frameworks do this) .. or look for another hosting. – LazyOne Sep 09 '11 at 18:03

1 Answers1

2

You can in your

<VirtualHost *:80> RewriteEngine On</VirtualHost>

in your httpd.conf

Digital Human
  • 1,599
  • 1
  • 16
  • 26
  • Thanks @Digital, Is there any other option to enable mod rewrite. because in my hosting plan I don't have option to access httpd.conf. – vinoth Sep 09 '11 at 19:01
  • I imagine putting the same line of code in a `.htaccess` file would do the same thing. – Jhecht Sep 15 '14 at 00:55