0

I have URL like

  • www.abc.com/pqr
  • www.abc.com/sss/pqr/abc
  • www.abc.com/ass/pqr/asd/dff

I want to change the pqr to some other word without affecting original functionlaity.

currently I had done something like this

RewriteRule ^pqr/(.*) http://www.mysite.com/someotherword/$1 [L]

But it is affecting functionality like search, login. it is getting redirect the way i want it.

Please help

2 Answers 2

1

If you want just to replace the "pqr" part, this is the rewriterule: RewriteRule ^(.)pqr(.)$ $1someotherword$2 [L]

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

Comments

0

Sounds like the query string is missing? Try:

RewriteRule ^pqr/(.*) http://www.mysite.com/someotherword/$1 [QSA,L]

Alternates to POST data

Use GET instead.

Use a Rewrite condition to not redirect files with POST data, store the data in the database, then call a redirect file, when the file opens on the new server, load the post data from the database.

4 Comments

It is Getting redirected but i am not getting POST Data. that is why search and login functionality is not working. i tried the Your answer as well but it is working same as mine. anyway thanks for instant reply.
Post data won't be sent to a new URL, it's a security issue.
So Is there any other way so that i can change part of url as well as post data?
@PratikPrajapati No, you can't rewrite/redirect with POST data

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.