1

I need a request like:

www.mydomain.com/books/catalog.html?param1=abc&param2=123param3=etc

to internally rewrite so content gets served from:

www.mydomain.com/index.php?page=books/catalog.html&param1=abc&param2=123&param3=etc

1 Answer 1

1

Put this code in your DOCUMENT_ROOT/.htaccess file:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ /index.php?page=$1 [L,QSA]
Sign up to request clarification or add additional context in comments.

2 Comments

Champion - it works a treat, Thanks! (Just noticed I need more reputation before I can vote you up, but answer accepted)
Glad it worked out. Acceptance is good enough though now you have good enough reputation to vote up :)

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.