0

If someone tries to access this page:

www.myhomepage.com/m/40921

I want the URL (above) to remain the same but the content should be from this page:

www.myhomepage.com/msg?t=40921

0

1 Answer 1

1

If it must be exactly like you said, then use this

RewriteRule ^m/([0-9]+)\/?$ msg?t=$1

But I think you made a typing error. Shouldn't it be msg.php? If so, use this:

RewriteRule ^m/([0-9]+)\/?$ msg.php?t=$1

And in your php file, you can get the t with $_GET['t'].

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

1 Comment

On my server I need a slash before the "m" to work: ^/m/([0-9]+)\.php/?$ msg.php?t=$1

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.