Im sure someone can help me with this problem, I am new to this and don't want to mess something up Basically I know nothing of mod rewrite, though I know of some of its benefits, could someone suggest how to solve this problem: I have a PHP file that will generate a webpage based on a HMTL template, when I have generated this HTML file, I want to change the URL to a specific format i.e. From: http://mysite.com/generatepage.php To: http://mysite.com/variable1/variable2/variable3.html The variables will already be known and the directories will already be created, what im actually planning on doing is generating the html file, storing it onto my server using the 'file_put_contents' function at the specific location of my generated url i.e. http://mysite.com/variable1/variable2/variable3.html How would I be able to generate the html file, save it on the server and mod rewrite the current generated html to display the correct URL? Thanks in advance !
Please give us more info this is just not enough! What's your site about and why do you want to use /variable1/variable2/variable3.html? what does this stands for? /user/category/script.html? more details wanted!
i think you have totally misunderstood what mod_rewrite actually does its a URL translation system - it doesn't rewrite urls on your html output instead it points www.blah.com/nice-url.html to www.blah.com/index.php?var1=nice&var2=url or whatever fyi - to do that particular rewrite it woudl be RewriteRule ^(.*)-(.*).html$ index.php?var1=$1&var2=$2 [L]