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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:15:29+00:00 2026-06-03T18:15:29+00:00

I have a php/apache website under my userdir, say http://localhost/~johnny5/ I have a /en

  • 0

I have a php/apache website under my userdir, say http://localhost/~johnny5/

I have a /en folder with a .htaccess file and a index.php file :

/home/johnny5/public_html
                         /somefile.php
                         /someotherfile.php
                         /en/
                            .htacces
                            index.php

I enable url rewriting under /en so all the request are handled by index.php. here’s the content of .htacces :

Options +FollowSymLinks
RewriteEngine On
RewriteBase /~johnny5/en
RewriteRule . index.php

Up to here, everything works correctly.

When I hit, say, http://localhost/~johnny5/en/foo/bar, the request is handled by /en/index.php.

Now, for testing purpose, I move the site under /var/www so I can acces it directly by http://localhost/. I adjust the .htaccess file to remove the user folder:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /en
RewriteRule . index.php

I now have this structure:

/var/www
        /somefile.php
        /someotherfile.php
        /en/
            .htacces
            index.php

Now, if I hit http://localhost/en/foo/bar, I’d expect the request to be handled by /en/index.php, but all I got is a 404 not found for /en/foo/bar.

It looks like the rewrite module works under my user dir, but not under the “main” dir.

I am missing something?

  • 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-03T18:15:35+00:00Added an answer on June 3, 2026 at 6:15 pm

    So that was all my error – misconfiguration.

    I “AllowedOverride” under the wrong folder.

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

Sidebar

Related Questions

I have installed my website in a subfolder www.server.com/folder/index.php Is there any way to
In my website, website.com/downloads actually goes to website.com/index.php?page=downloads (with apache rewriting). I have a
I have a PHP file for my website, index.php, which, as it stands on
I'm writing a website and I have a php file in the home directory
I have inherited an big existing PHP application (website actually) that runs on Apache.
I have just installed CentOS, Apache and PHP. When I visit my site http://example.com/myapp/
I have successfully setup a localhost (Individual Installs) with Apache 2.2, MySQL and PHP,
I have a php-apache website on which I am trying to track download conversions
I have a single point of entry on my website mysite.com/admin/index.php? View=List&Model=User All access
I'm writing multilingual website. I have several files on server like: /index.php /files.php /funny.php

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.