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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:53:05+00:00 2026-06-10T20:53:05+00:00

this is my file structure at the web server: DOCUMENT_ROOT/ foo/ www/ .htaccess bar/

  • 0

this is my file structure at the web server:

DOCUMENT_ROOT/
  foo/
    www/
    .htaccess
  bar/
  index.php

What i should write to foo/.htaccess, if I want to redirect everything from www.myserver.com/foo/www/ to www.myserver.com/foo/?

I tried this:

RewriteEngine On
RewriteRule ^(.*)$ /www/$1 [L,NE]

But error 404 is always shown. I tried elaborate with RewriteBase also with no success.

Thanks a lot

P.S. When www/ and .htaccess is in DOCUMENT_ROOT, it works OK. But when I put them to subfolder, always getting error 404 🙁

  • 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-10T20:53:06+00:00Added an answer on June 10, 2026 at 8:53 pm

    Yes, I want to go to http://www.myserver.com/foo/ and get served the stuff in /foo/www

    This will never work if your htaccess file is in /foo/www because it won’t take effect unless the request is for something inside /foo/www. The request is only /foo so the .htaccess file is ignored. You’ll need to either move the .htaccess file to the document root, changing it to:

    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/foo/www
    RewriteRule ^foo/(.*)$ /foo/www/$1 [L]
    

    or move it to the /foo directory, changing it to:

    RewriteEngine On
    RewriteBase /foo
    RewriteCond %{REQUEST_URI} !^/foo/www
    RewriteRule ^(.*)$ www/$1 [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a file system structure with symlinks, something like this: folder123 index.php config.php
I have this file structure: folderIWantStuffIn/ - old_stuff Now I want to add some
I'm running PHP on a shared Apache web server. I can edit the .htaccess
I have a file structure like this: dir_a __init__.py mod_1.py mod_2.py dir_b __init__.py my_mod.py
I have a file structure like this: root |_ fruits |___ apple |______images |________
I have a file structure that looks like this ./501.res/1.bin ./503.res/1.bin ./503.res/2.bin ./504.res/1.bin and
I have a file with structure like this: [05:58:10 08.12.1990] 125.441 [05:58:21 08.12.1990] -2.4158
I have some data and need to create a json file with this structure
I am having this structure in a .c file: struct entry { int position;
This is my Database structure, One-to-One mapping in MySQL: This is my java file:

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.