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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:40:11+00:00 2026-06-14T11:40:11+00:00

:-) I need a .htaccess RewriteRule that can do this: If the browser load

  • 0

🙂

I need a .htaccess RewriteRule that can do this:

If the browser load this url path:

http://www.domain.com/example/word_to_change/

change to

http://www.domain.com/example/new_word/

take a look that the “word_to_change” and “new_word” appears in the third level in the path

I was tried this:

RewriteRule ^(word_to_change/)?$ /new_word/ [R,L]

But only works if the “word_to_change” appears in the second level, not in the third.

thanks for your help! 🙂


ADDED:

three examples:
need to change

http://www.domain.com/second_level_with_any_word/specific_word_1 or
http://www.domain.com/example_1/specific_word_1 or
http://www.domain.com/example_2/specific_word_1

to

http://www.domain.com/second_level_anything/specific_word_2 or
http://www.domain.com/example_1/specific_word_2 or
http://www.domain.com/example_2/specific_word_2

maybe is mor simple for explain with this other example:

http://*/*/specific_word1
for
http://*/*/specific_word2
  • 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-14T11:40:17+00:00Added an answer on June 14, 2026 at 11:40 am

    This depends on what to acomplish, if you want to change ANY word that apeaers after example with a SPECIFIC word then what you need is:

    RewriteRule ^example/(.*) /new_path/ [R,L]
    

    if you want to pass that word as a paramater you can use

    RewriteRule ^example/(.*) /new_path/process.php?word=$1 [R,L]
    

    if you want to send any URL that ends with a specific word try this

    RewriteRule ^(.*)/old_word/$ /$1/new_word/ [R,L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a .htaccess configuration that does the following: Redirect www.domain.com to domain.com Redirect
I have the following .htaccess rule: RewriteEngine on RewriteRule ^(.*) http://www.server2.com/index.php?action=$1 I need to
I need to change the url of a directory so that: www.example.com/foo/ becomes www.example.com
I need to update my .htaccess file to redirect permanently all URLs from http://example.com/pages/5604/article/something/?page=299
Can anyone help with .htaccess URL rewriting rule. I need to redirect pages like
I need to add this line to every .htaccess file that is located in
I need to redirect users accessing mysite.com to www.mysite.com in my .htaccess file. The
This is beyond my level and I need some help. In the htaccess make
I have a dynamic query string that I need to pass via an .htaccess
I am new to this but I have the following .htaccess that works correctly:

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.