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

  • Home
  • SEARCH
  • 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 1107939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:00:28+00:00 2026-05-17T02:00:28+00:00

1) I have a Drupal site located at http://example.com and I have a directory

  • 0

1) I have a Drupal site located at http://example.com and I have a directory located at http://example.com/foo, but I also have a Drupal page with an alias of http://example.com/foo. How can I get the Drupal page to serve? Currently, I get a 403 forbidden page as a result of the Options -Indexes declaration in Drupal’s .htaccess file, but I do not want to remove this as I do not want directories to be browsable.

EDIT: I have solved this with the following rule:

RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ http://localhost/s2k/index.php?q=$1 [L,QSA]

2) To make the problem even more difficult, given the same scenario, if I have an index.html file inside the directory http://example.com/foo/index.html I always want this to take priority over Drupal’s aliased page (which it does at the moment – currently I have modified the .htaccess file so that any directory with an index.html file displays it – DirectoryIndex index.php index.html).

EDIT:

So now, how can I write a RewriteCond that will look to see whether or not there is an index.html file inside the directory?

  • 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-17T02:00:28+00:00Added an answer on May 17, 2026 at 2:00 am
    RewriteCond %{REQUEST_FILENAME} -d  
    RewriteCond %{REQUEST_FILENAME}/index.html !-f
    RewriteRule ^(.*)$ http://localhost/s2k/index.php?q=$1 [L,QSA]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have added two modules in my drupal site called.... 1. me alias 2.
On my Drupal site, I have made a Users page using the Views module,
I have an old drupal site that I'd like to upgrade, but I need
I have a Drupal site on which users can enter CCK content by uploading
I have Drupal 7 installed in the root directory of my site. The .htaccess
I am working on a Drupal site that needs to have a 'careers' page.
I have Drupal 7 site which is working fine. I added a custom PHP
I have a Drupal site on a shared web host, and it's getting a
Right now I have a Drupal site where I'm integrating a custom front-end interface
I have a Drupal 7 site and need to output a small calendar control

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.