mbenam Posted June 4, 2005 Report Share Posted June 4, 2005 Hello, I am trying to check whether mod_rewrite is working on my installation or not. I have ensured that mod_rewrite is not commented out in the http.conf at \usr\local\apache2\conf. At docroot I have two files test.html and test2.html. I tried to access http://localhost/test.html using the following .htaccess file and get a 403 forbidden error. Order Deny,AllowDeny from allAllow from 127.0.0.1 RewriteEngine OnRewriteRule ^test.html$ /test2.html [R=301] If I delete the first 3 lines then I get a 500 Internal Server Error. Can anyone please help me out here? Thanks. mbenam. Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted June 4, 2005 Report Share Posted June 4, 2005 If you are trying to access your server from "localhost" or "127.0.0.1" then you should not get a Forbidden error. If you are access it via your IP then you should. About the 500 internal error, i do not think you use mod_rewrite like that. You use it like that for a PHP script but not for HTML i think. Anyways, try a PHP script like MediaWiki and test it to see if it will work... Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
mbenam Posted June 4, 2005 Author Report Share Posted June 4, 2005 Hi, I have been trying to access the page using localhost and still getting the forbidden error. Also I tried changing the file extension from .html to .php. I am getting the same error. Can you explain your comment about PHP script like Mediawiki. Thanks. mbenam. Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted June 4, 2005 Report Share Posted June 4, 2005 You can't just change the extention. Everything depends on what is the file for the mod_rewrite to work. Search Google for a sample script, tutorial or something and test it. About the forbidden error, you should not be getting that. It restricts access to your server to only localhost, meaning those outside can't access it. Change it from 127.0.0.1 to localhost and see what happens. Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
elyk Posted June 5, 2005 Report Share Posted June 5, 2005 try putting this in the .htaccess fileREDIRECT from towhere "from" is the server path (I think relative to the .htaccess file) of the file or directory (with a slash at the end) that you are redirecting from and "to" is the full url of the page to redirect to. Quote Link to comment Share on other sites More sharing options...
mbenam Posted June 5, 2005 Author Report Share Posted June 5, 2005 Hello everyone, the CMS I am using suggested to add this line in .htaccess and that did the trick. Options +FollowSymLinks I am not sure what it's doing but it's working perfectly. I guess I have to study more about mod_rewrite. Thanks. mbenam. Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted June 5, 2005 Report Share Posted June 5, 2005 May i say n0ob? Moving the topic to where it really belongs The problem is not with uniform Server Quote Best Regards Olajide Olaolorun The Uniform Server Development Team 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.