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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:42:15+00:00 2026-06-11T09:42:15+00:00

On a website I work on, there is a directory with files like this:

  • 0

On a website I work on, there is a directory with files like this:

abc.com/parts/df/df001/df001.html

There are about 800 in the sequence of df numbers. I’d like to be able to use a link like this:

abc.com/parts/df/df001/

I know you can use defaultIndex to set the default page to something other than index.html, but can you do this for a specific directory, such that for all sub directories of /parts/df map to an HTML file with the same name as the subfolder?

Or, better yet, I’d like to use a URL like this:

abc.com/parts/df001 (even though the file lives at abc.com/parts/df/df001/df001.html)

I think this might be possible with mod_rewrite and regular expressions, but I can’t figure it out.

  • 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-11T09:42:16+00:00Added an answer on June 11, 2026 at 9:42 am

    look at the Apache HTTPD documentation – the directive you’re looking for is called DirectoryIndex. The contexts you can define that are given with server config, virtual host, directory, .htaccess – but at the same time you learn (from the documentation) that there’s no type of regex supported for that directive. Therefore mod_rewrite is what you need.

    Regarding the regex – I’d say you can use sth like this:

    RewriteRule ^parts/df/df(\d+)/$ parts/df/df$1/df$1.html [L,R=301]
    

    To be placed either in a .htaccess within parts/df (or any upper folder) or within the vhost configuration. For details on that see the documentation.

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

Sidebar

Related Questions

There is a website in Joomla, the NavigationPath ist domain.tld/index.php/produkte/produkt1.html this work fine. But
Work on the following website: http://cetcolor.com The masthead graphic with the Read About It
i would like to work on a website in order to develop other fonctionalities.
I'm trying to work on this website wherein I need to filter the data
i have some html files as part of a regular website that has been
I have a lighttpd server with website placed in /home/httpd/example.com/httpdocs and there I have
When I load the frontpage of the website I work for in IE it
I recently moved to Visual Studio 2010 and upgraded my website to work with
I am currently using WatiN to automate a proprietary website at my work, and
I work at a company that has many clients that have their own website

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.