June 4, 200520 yr comment_877 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. Report
June 4, 200520 yr comment_879 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... Best Regards Olajide Olaolorun The Uniform Server Development Team Report
June 4, 200520 yr Author comment_881 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. Report
June 4, 200520 yr comment_882 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. Best Regards Olajide Olaolorun The Uniform Server Development Team Report
June 5, 200520 yr comment_887 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. Report
June 5, 200520 yr Author comment_888 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. Report
June 5, 200520 yr comment_889 May i say n0ob? Moving the topic to where it really belongs The problem is not with uniform Server Best Regards Olajide Olaolorun The Uniform Server Development Team Report
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.