Reputation: 471
I have an url in the following format:
http://example.com/realestate/index.php?page=services.html
How can change it to the following format with a .htaccess
file?
http://example.com/services.html
So that index.php?page=
is omitted and only services.html
part is shown in the browser's
url.
I dont know anything about writing .htaccess files.
Upvotes: 0
Views: 306
Reputation: 30121
Try something like this:
RewriteEngine on
RewriteRule (.*)\.html http://example.com/index.php?page=$1 [L]
Now the url xyz.com/services.html would be rewritten to xyz.com/index.php?page=services.html
Upvotes: 1