theOlster Posted April 25, 2007 Share Posted April 25, 2007 Hi, I've been phping for some time now but am new to mod_rewrite. I can't seem to enable it on my server. I don't have access to the conf file, so I was hoping to enable it via .htaccess. I've tried using some of the examples posted in this forum, but can't get phpinfo to return any mention of mod_rewrite being active. Can someone help me with this? My server is with 1and1 (oops!) and I'm happy to post the results of phpinfo if required. Thanks... Quote Link to comment Share on other sites More sharing options...
lachild Posted May 10, 2007 Share Posted May 10, 2007 There are a number of tutorials online for Mod_Rewrite. A simple google search for mod_rewrite and htaccess will bring up quite a few for you. Also I don't believe that PHP Info will show you the information you're looking for. The best way to check for mod_rewrite (that I've found anyway) is to simply create a quick htaccess file for testing Options +FollowSymLinks RewriteEngine on RewriteRule ^test.html$ test.php Next add a quick PHP script called "test.php" to make sure this took. If all went well you should be able to simply type in test.html and test.php will be whats actually displayed. If you get a server 500 error try this htaccess instead. (Some linux distrubutions like Debian tend to error out with followsymlinks on) RewriteEngine on RewriteRule ^test.html$ test.php if it still fails... Then you'll need to contact your web host to enable the rewrites engine, or find out what weird thing they require you to do to enable it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.