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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:07:07+00:00 2026-06-12T17:07:07+00:00

I want to redirect all /wordpress/ requests to the same address at root. For

  • 0

I want to redirect all /wordpress/ requests to the same address at root.

For example:
/wordpress/foo -> /foo

I tried this answer I found by adding it to the .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^wordpress/.*$ / [R=302]
</IfModule>

but needless to say, it just redirects the direct request to /wordpress/ to /.

e.g. a request to /wordpress/foo/ will still be treated as /wordpress/foo/.

I tried everything I found but nothing works.

website address is http://www.ist118.com/

an example address that doesn’t redirect correctly is http://www.ist118.com/wordpress/%D8%A8%D9%87%D8%AA%D8%B1%DB%8C%D9%86-%D8%B1%D8%A7%D9%87%D9%86%D9%85%D8%A7%DB%8C-%D8%AE%D8%B1%DB%8C%D8%AF-%D8%A7%D8%B2-%D8%A7%D8%B3%D8%AA%D8%A7%D9%86%D8%A8%D9%88%D9%84/%D9%82%DB%8C%D9%85%D8%AA-%D8%AE%D9%88%D8%B1%D8%A7%DA%A9%DB%8C-%D9%87%D8%A7-%D8%AF%D8%B1-%D8%A7%D8%B3%D8%AA%D8%A7%D9%86%D8%A8%D9%88%D9%84/

(url is encoded because of utf8 arabic characters)

Complete .htaccess contents:

RewriteOptions inherit

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule /wordpress/(.*) /$1 [PT]
</IfModule>
  • 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-12T17:07:09+00:00Added an answer on June 12, 2026 at 5:07 pm

    Try this:

    RewriteRule /wordpress/(.*) /$1 [PT]
    

    UPDATED

    I think your .htaccess should look like this:

    RewriteOptions inherit
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule /wordpress/(.*) /$1 [PT]
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    

    UPDATED

    Just for your information.

    If you need just transparent redirection, you should use

    RewriteRule /wordpress/(.*) /$1 [PT]
    

    in this case redirect will transparently and user will still see an old URL in browser’s address line

    But if you want user to know the URL was changed, you should use

    RewriteRule /wordpress/(.*) /$1 [R=301]
    

    in this case URL will changed in browser’s address line too

    And one more:

    R=301 - is for permanently moved URLs (user's browser will rememeber the new URL)
    R=302 - is for temporarely moved URLs
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to redirect all incoming requests to my root domain, and found the
I want to redirect all requests like: /xml/doSomething?arg=value To: /xml.php?action=doSomething&arg=value I tried this simple
I want to redirect all user page requests to a page on the same
i want redirect all request to *.exapmle.com/foo/bar?moo=soo TO exapmle.net/foo/bar?moo=soo for example www.exapmle.com/foo/bar?moo=soo TO exapmle.net/foo/bar?moo=soo
I want to redirect all the requests coming for Service1 to Service2. I tried
I want to redirect all requests for index.html|php|php5 to http://www.domain.co.uk/ using mod_rewrite and I've
I have a site that i want to redirect all requests accept for 1
i want Redirect the old url`s to new address. Redirect all http://www.mysite.com/viewdownload/**/** url`s to
I want to redirect all www.domain.com requests to domain.com with PHP, basically: if (substr($_SERVER['SERVER_NAME'],
I am currently developing a Rack-based application and want to redirect all file requests

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.