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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:51:03+00:00 2026-05-12T08:51:03+00:00

The application i’m developing uses a certain file directory structure. Via the use of

  • 0

The application i’m developing uses a certain file directory structure. Via the use of mod_rewrite and .htaccess files, i manage to have friendly urls for our users. It works fine on my local server, but once on the production server, it fails: apparently, the server throws a 404 error before the .htaccess has a chance to kick in.

Here is the .htaccess i’m working on (referenced as (1) here below):

IndexIgnore *
#Options +FollowSymLinks
RewriteEngine on

RewriteOptions inherit

RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteRule ^(.*)$ /~extranet/extranet/$1 [NC,L,QSA]

On the server, it returns 404:

The server can not find the requested
page:

<IP-ADDRESS>/~extranet/extranet/dev/foo/

(port 80)

In fact, it seems any redirect fails, although phpinfo() lists mod_rewrite among the loaded modules.

The server is brand new. (In case it helps, the 404 page lists Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.8 Server )

Where should i look for the mistake/misconfiguration?

UPDATE: more information

here is the file/folder structure and each .htaccess used:

<IP-ADDRESS>/~extranet/.htaccess (1)
<IP-ADDRESS>/~extranet/extranet/
                              L .htaccess (2)
                              L/dev/
                                   L .htaccess (3)
                                   L index.php
                              L/stable/
                                   L .htaccess (3)
                                   L index.php

(1) redirects all requests to folder “extranet”
(2) redirects all requests not containing “/dev/” to folder “stable”
(3) rewrites /extranet/foo/bar/ to index.php?app=foo&do=bar

  • 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-05-12T08:51:04+00:00Added an answer on May 12, 2026 at 8:51 am

    There’s a tilde in here: <IP-ADDRESS>/~extranet/extranet/dev/foo/

    Your regexes as specified will not match the tilde.

    Perhaps you need to specify your RewriteBase properly for your remote webserver?

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

Sidebar

Ask A Question

Stats

  • Questions 171k
  • Answers 171k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Pass type(connection) (connection class) to inspect.getmodule(), not connection object. The… May 12, 2026 at 2:23 pm
  • Editorial Team
    Editorial Team added an answer On server side, when serving file, add this header: Content-Disposition:… May 12, 2026 at 2:23 pm
  • Editorial Team
    Editorial Team added an answer awk '!seen[$0]++' file.txt seen is an associative array that AWK… May 12, 2026 at 2:23 pm

Related Questions

The application I'm writing is almost complete and I'd like people who speak different
The application I am currently working on generates a lot of SQL inline queries.
The application I'm working on is using a scanner, which may belong to one
The application I'm working on has a single class that maintains a database connection.
The application I work uses XML for save/restore purposes. Here's an example snippet: <?xml

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.