What is the syntax to mod_rewrite "ONE file" from upload.php to upload.html in .htaccess? I have syntax for ALL files, but how do I do that for one file? I tried many other variations but still nothing. I just keep getting a page that says: MULTIPLE CHOICES. file not found...etc. Right now upload file must be a php in order to work but I want the address in the browser address bar to say upload.html because that page has google ranking. Yes, I know I can 301 redirect but I want to see how this can be done with htaccess THanks
Well this thing looks working RewriteEngine on RewriteBase / RewriteRule ^upload\.html$ upload.php Code (markup): Make sure the RewriteBase is the folder name you are in. This will just execute upload.html as upload.php and supports any function similar to upload.php
And, just in general, and to avoid unnecessary server load for rewrites and such, just make a plain upload.html HTML file, and process the upload in upload.php (linked from the upload-form).
For the form to make the upload work, it has to be in php because it looks for a token. This is the beginning of the file that must be used: <?php require dirname(__FILE__)."/uploads/php/csrf.php"; $new_token = new CSRF('contact'); ?> Code (markup): and the rest is pretty simple processing script. Im not really a coder but Im trying to make sense out of this.