Put/embed your php script inside html file(s); for example:
<!-- test1.html -->
<html>
<body>
<p>
This is Test 1
</p>
</body>
</html>
<!-- test2.html -->
<html>
<body>
<p>
This is Test 2
</p>
<?php
echo "And this is generated from PHP";
?>
</body>
</html>
Then put this line of code in your htaccess file:
AddType application/x-httpd-php .html
And for testing this, your htaccess should be as follows:
# .htaccess
# Embed PHP in HTML
AddType application/x-httpd-php .html
# Rewrite rules
RewriteEngine on
RewriteRule ^test1.html$ test2.html
Save these 3 files as test1.html, test2.html and .htaccess in folder c:/wamp/www/testRewrite and access as follows:
http:// localhost/testRewrite/test1.html
If you've already enabled mod_rewrite through wamp tray icon, you should see the result of test2.html as follows:
This is test 2
And this is generated from PHP
Even when select view source code in browser, you only see html codes

Have fun,
FREE One A DayFREE PhotoFREE GamesFREE WebsitesFREE Portable GPSFREE WAMP Guides