473,396 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

mod_rewrite help: More than 32000 directories on Linux problem?

Hello,

I am running RedHat & Apache. RedHat does not allow creating more
that 32000 subdirectories in one folder due to #defined constant
limitation in the core code.

I need to display 47000 directories on web page:
e.g. mydomain.com/andrew , mydomain.com/bill , etc. Each directory
contains .html/htm files and image files (*.jpg, *gif, jpeg etc.)

The directory structure has been created previosly some time ago and
worked perfectly on WinNT machine untill now. Modifying HTML seems to
be a big job to do.

Can anyone suggest a solution using mod_rewrite?

Thanks!

Dgrand
Jul 17 '05 #1
4 2531
Support <di***@my-deja.com> wrote:
I am running RedHat & Apache. RedHat does not allow creating more
that 32000 subdirectories in one folder due to #defined constant
limitation in the core code.
What filesystem are you using?
I need to display 47000 directories on web page:
e.g. mydomain.com/andrew , mydomain.com/bill , etc. [snip]
Modifying HTML seems to be a big job to do.
No kidding :)

But a regexp equivalent to the rule below seems to be more efficient
than using the rewritengine.
Can anyone suggest a solution using mod_rewrite?


A simple workaround would be to reorganize directories like:
/a/andrew
or
/b/i/bill

With the rewrite engine it would become something like:
RewriteRule ^(.)(.*) /$1/$1$2

You'll need to lookup the exact syntax yourself :)

--

Daniel Tryba

Jul 17 '05 #2
Daniel Tryba <ne****************@canopus.nl> wrote:
No kidding :)

But a regexp equivalent to the rule below seems to be more efficient
than using the rewritengine.

(forgot half the sentence)
So spending some time to figure out how to edit the html might be the
longterm goal. Using sed/awk/perl/php or some other scripting magic to
rewrite href or img attributes shouldn't be to difficult eiter.

--

Daniel Tryba

Jul 17 '05 #3
Daniel,

thank you for the reply. That ia what I am doing now - moving all the
stuff into /a/andrew ; /b/bill etc. Anybody knows exact syntax for
Mod_rewrite for this sort of directory arrangment?
RewriteRule ^(.)(.*) /$1/$1$2
I've tried
RewriteRule ^([a-zA-Z]{1})(.*)$ /$1/$1$2 [L]
does not seem to work

DgranD

Daniel Tryba <ne****************@canopus.nl> wrote in message news:<cl**********@news.tue.nl>... Support <di***@my-deja.com> wrote:
I am running RedHat & Apache. RedHat does not allow creating more
that 32000 subdirectories in one folder due to #defined constant
limitation in the core code.


What filesystem are you using?
I need to display 47000 directories on web page:
e.g. mydomain.com/andrew , mydomain.com/bill , etc.

[snip]
Modifying HTML seems to be a big job to do.


No kidding :)

But a regexp equivalent to the rule below seems to be more efficient
than using the rewritengine.
Can anyone suggest a solution using mod_rewrite?


A simple workaround would be to reorganize directories like:
/a/andrew
or
/b/i/bill

With the rewrite engine it would become something like:
RewriteRule ^(.)(.*) /$1/$1$2

You'll need to lookup the exact syntax yourself :)

Jul 17 '05 #4
"Daniel Tryba" <ne****************@canopus.nl> wrote in message
news:cl**********@news.tue.nl...
Support <di***@my-deja.com> wrote:
I am running RedHat & Apache. RedHat does not allow creating more
that 32000 subdirectories in one folder due to #defined constant
limitation in the core code.


What filesystem are you using?
I need to display 47000 directories on web page:
e.g. mydomain.com/andrew , mydomain.com/bill , etc.

[snip]
Modifying HTML seems to be a big job to do.


No kidding :)

But a regexp equivalent to the rule below seems to be more efficient
than using the rewritengine.
Can anyone suggest a solution using mod_rewrite?


A simple workaround would be to reorganize directories like:
/a/andrew
or
/b/i/bill

With the rewrite engine it would become something like:
RewriteRule ^(.)(.*) /$1/$1$2


Or to reduce the amount of directory reorganization, just split them up into
two folders:

RewriteRule ^([a-j].*) /a-j/$1
RewriteRule ^(.*) /the-rest/$1
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: R.Wieser | last post by:
Hello All, I'm trying to get a "Virtual Listbox" to work. I've currently got a form, and used CreateWindowExA to create a ListBox with the LBS_OWNERDRAWFIXED and LBS_NODATA flags on it. I've...
4
by: D | last post by:
Hi folks, This may be pretty simple for you guys but it has me stumped. BTW I'm using Java 1.1, I know it's old, don't ask me why, I just have to. I have a long string in excess of 50k that I...
4
by: PaulR | last post by:
Hi, We have a Server running SLES 8 and 3GB memory, with 1 DB2 instance and 2 active Databases. General info... DB2level = "DB2 v8.1.0.72", "s040914", "MI00086", and FixPak "7" uname -a =...
1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
3
by: Rik G. | last post by:
I'm trying to replace a PHP query string with virtual directories using Apache's mod_rewrite. Here's my test .htaccess: RewriteEngine on RewriteRule ^qqq$ database.php?cat=0 RewriteRule...
2
by: jaanus | last post by:
Here we go... What I have been trying to do is to forward all http requests containing /cms/ to http://cms.mydomain.com/ example1: http://host1.mydomain.com/cms/init.php would be parsed from...
3
by: dennis.sprengers | last post by:
* I'm trying to work out some rewrite rules that should do the following: case 1: a request to mysite.com: rewrite http://www.mysite.com/files/sheets.ppt to...
2
by: beary | last post by:
Hello everyone, I posted this in unix/linux but it received no replies, so I assume it was the wrong forum. I'm trying here. I'm in way over my head with file permissions. The directory and...
7
by: Dale | last post by:
again, i know this is OT...just move along to the next post if it bugs you. :) i had been trying to have this: project.66.204.32.110 from the client browser, map to a virtual host where the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.