Forum Moderators: phranque

Message Too Old, No Replies

Solve This Rewrite Puzzle?

         

consultant

6:58 am on Jan 28, 2004 (gmt 0)

10+ Year Member



Ah the infamous mod_rewrite topic, the biggest pain to deal with regarding Apache.

Any easy way to do this.

Browser comes in at URL
[sitedomain.com...]

If the directory does not exist, should rewrite to:
[sitedomain.com...]

[edited by: jdMorgan at 7:30 pm (utc) on Jan. 28, 2004]
[edit reason] Spelling [/edit]

jdMorgan

7:32 pm on Jan 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



consultant,

See the "-d" CondPattern for RewriteCond [httpd.apache.org].

Jim

consultant

10:31 pm on Jan 28, 2004 (gmt 0)

10+ Year Member



I was aware of the -d flag. I was hoping someone could give me an example how I should use it in my case.

jdMorgan

3:36 am on Jan 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Place the RewriteCond in front of your RewriteRule that does the redirect:

RewriteCond %{REQUEST_URI} -d

Jim

consultant

4:34 am on Jan 29, 2004 (gmt 0)

10+ Year Member



That's the problem, whenever I try to do a rewrite rule is seems like it takes about a half hour of trial an error. The syntax is hard to understand. I was hoping someone here who's a guru at the syntax could give me a shortcut