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.
Asked
Active
Viewed 1.5k times
3
-
1mod_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 Answers
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