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 8462841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:17:11+00:00 2026-06-10T14:17:11+00:00

I need to redirect the following two URLs as shown: http://domain.com/folder/file.php -> http://domain.com/folder2/ http://damain.com/folder/file2.php?id=13

  • 0

I need to redirect the following two URLs as shown:

http://domain.com/folder/file.php -> http://domain.com/folder2/
http://damain.com/folder/file2.php?id=13 -> http://domain.com/folder2/

Normally I would have used something like:
RewriteRule ^/folder/file\.php /hackme/ [R]

But it seems that, as “folder” does not exist, the redirection cannot take pleace. Can somebody help me figure out how to do this please?

  • 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-06-10T14:17:13+00:00Added an answer on June 10, 2026 at 2:17 pm

    I think you are looking for this :

    RewriteEngine on
    
    RewriteBase /
    
    RewriteRule ^folder/file\.php folder2/ [L,R=301]
    
    RewriteCond %{QUERY_STRING} ^id=13$
    RewriteRule ^folder/file2\.php folder2/ [L,R=301]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need help to redirect the following URL (in htaccess) http:www.domain.com/article/the-bp-oil-spill-one-year-later/19918396/20110420/ To http:www.domain.com/article/the-bp-oil-spill-one-year-later/19918396/2011/04/20/ my
I need a .htaccess configuration that does the following: Redirect www.domain.com to domain.com Redirect
I need to redirect some urls. Formerly I had http://mysite.com/foobar/?section_id=1234 These are no pointing
I need to redirect the following JS snippet, to http://localhost/homepage at the end of
I have the following htaccess to redirect users from www.mysite.com or http://mysite.com to http://mysite.com/subfolder
I activated SEO friendly URLs. Basically URLs in my app looks like following: http://x.com/en
I need to redirect all urls with matching keyword, regardless of position in link,
I need to redirect user to another page called free.php from index page, if
I need to redirect any URLs without www. to URLs with www. for better
I need to redirect all page requests (php, if that matters) on a specific

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.