I have a program that provide step registration1,step registration2. My structure like this:
localhost/bandung/registration.php
then when submit button, the page will send parameter
localhost/bandung/registration.php?user=xxxxxx
Can I change the extention of php to html but still have the parameter like:
localhost/bandung/registration.html?user=xxxxxx
Create in your bandung
folder a new htaccess file. Then add the following lines in it:
# Set Rewrite Engine on
RewriteEngine on
# Create rewrite rule for your registration.php
RewriteRule ^registration.html?user=(.*)$ registration.php?user=$1 [R=301,L]
RewriteRule ^(.*)\.php $1.html [R=301,L]
RewriteRule ^(.*)\.html $1.php
edit after pulling white rabbit out of the hat
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} (.*)\.php
RewriteRule ^(.*)\.php $1.html [R=301,L]
RewriteCond %{THE_REQUEST} (.*)\.html
RewriteRule ^(.*)\.html $1.php [L]