0

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.

1

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.