0

I am using some url like - www.mydomain.com/index.php?page=about_us

I want it to look like - www.mydomain.com/about_us

or

www.mydomain.com/page/about_us

How can I do this with htaccess? I will appreciate solution for both.

1 Answer 1

1

The usual method would be something like this:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?page=$1 [L]
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.