Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5951963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:36:47+00:00 2026-05-22T17:36:47+00:00

I need to rewrite a dynamic URL. The content myurl and mytext is always

  • 0

I need to rewrite a dynamic URL. The content myurl and mytext is always different and should be insert in the “text” and “url” from the Twitter string.

This is the string:

http://example.com/share/?myurl=http%3A%2F%2Fwww.example.com&mytext=helloworld
   /* forward to: */
http://twitter.com/intent/tweet?related=Example%3Aname&text=helloworld&url=http%3A%2F%2Fwww.example.com&via=example

How can that be made? (I browsed the .htaccess suggestions but couldn’t find a solution for my specific problem.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:36:48+00:00Added an answer on May 22, 2026 at 5:36 pm

    It will be more efficient to handle it with rewrite Rules.

    RewriteEngine On
    RewriteCond %{QUERY_STRING}  ^myurl=(.*)&mytext=(.*)$
    RewriteRule ^(.*)$ http://twitter.com/intent/tweet?related=Example%3Aname&text=%2&url=%1&via=example [R,L]
    

    If you want this to be permanent redirect then replace R with R=301.

    With permanent redirects , these links will always be redirected by browser and your server will have to deal with less traffic if that is desired.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Need to rewrite URL only when the URL is string and integer For
I need rewrite this url http://adresa.com/article.php?act=view&id=1113 to http://adresa.com/view/1113 I make it with mod_rewrite in
i have a mixed aspx/MVC webapp project and need to rewrite incoming URL's either
I need to rewrite a large number of URLs (about 250) on nginx. from:
I need a rewrite rule for this url http://localhost/~user/frame/lib/index.php?/controller/method/12/22/ How can i rewrite it
I need to rewrite URL like http://www.example.com/search.php?abc to http://www.example.com/abc using the rules below, but
I need to rewrite a url that contains a comma to another URL. The
I need a rewrite rule that will do an internal redirect from: <domain>/directory/<anything>/<anything>.php to:
I need to rewrite: index.php?node=[something] to /node/[something] (the node part will be static text
I need to rewrite my web URL such as http://www.site.com/profile/ -> profile.php http://www.site.com/settings/ ->

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.