You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Brian V Bonini <b-...@cox.net> on 2004/01/25 16:18:35 UTC

[users@httpd] Re: Another mod_rewrite question

On Tue, 20 Jan 2004 12:04:38 -0500, Scott Taylor wrote:

> 
> 
> I believe that this one should be able to be done (and thank you Brian 
> Dessent for the information on the last one):
> 
> If someone types domain.com/page/ I would like it to load 
> domain.com/page.php.  But in the case that page.php does not exist, for 
> it to load page.shtml,  And in case that does not exist, to page.html

I don't think the mod has an 'OR' operator. You will proabbly have to do
it in an external script.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Another mod_rewrite question

Posted by Ed Avis <ed...@membled.com>.
"Brian V Bonini" <b-...@cox.net> writes:

>>If someone types domain.com/page/ I would like it to load
>>domain.com/page.php.  But in the case that page.php does not exist,
>>for it to load page.shtml,

>I don't think the mod has an 'OR' operator. You will proabbly have to
>do it in an external script.

<http://www.engelschall.com/pw/apache/rewriteguide/> has some examples
of redirecting to file X if it exists, but if it does not exist, to Y.
Look at rewritecond, rewriterule and the -f test.

-- 
Ed Avis <ed...@membled.com>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


AW: [users@httpd] Apache: Once a Service, Always a Service?

Posted by SH Solutions <in...@sh-solutions.de>.
Hi

> but I learned how to change it to a service by typing a command into the
Windows Command Prompt.

Services are registered against the service manager, storing the information
about services in registry.

> I've had to reinstall this software package several times.

Did you uninstall the package beforehand? Or did you simply replace files?
If you did uninstall the old versions, did the uninstaller know about the
service?

In fact, if the service is not removed cleanly, windows will think it is
still there.
This is default behavior.

> Each time I reinstall it, Apache again opens up as a console.

As it is started by the setup.

> But I don't need to change it to a service, because it apparently changes
automatically when I reboot my computer.

As it is still registered in registry.
Btw - you don't need to restart you computer. The service entry in System
Control -> Services is never removed. Therefor you can simply start it
there.

> Does this make sense? If you install Apache as a service, is something
installed on your computer that remembers it as a service even after you
uninstall Apache?

Yes, windows registry.

But remember, if you have to change the services parameters, it might be
better to review them after updates.

cu,
  Steffen


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Apache: Once a Service, Always a Service?

Posted by David Blomstrom <da...@yahoo.com>.
Some time ago, I downloaded a preconfigured package
with Apache, PHP and MySQL and began learning the
ropes. Apache was set up as a console, but I learned
how to change it to a service by typing a command into
the Windows Command Prompt.

I've had to reinstall this software package several
times. Each time I reinstall it, Apache again opens up
as a console. But I don't need to change it to a
service, because it apparently changes automatically
when I reboot my computer.

Does this make sense? If you install Apache as a
service, is something installed on your computer that
remembers it as a service even after you uninstall
Apache?

This isn't a problem; it's actually very convenient.
But I'd just like to have a better idea of what's
going on, since I'm going to be doing a lot of work
with this program. I may even write a tutorial for
people who are really new to all of this and might
want to use the same software package I'm using.

Thanks!

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Another mod_rewrite question

Posted by Christian Völker <C....@gmx.net>.
On Tue, 20 Jan 2004 12:04:38 -0500, Scott Taylor wrote:

>> If someone types domain.com/page/ I would like it to load
>> domain.com/page.php.  But in the case that page.php does not exist, 
>> for
>> it to load page.shtml,  And in case that does not exist, to page.html

Why not: Redirect from domain.com/page/ to domain.com, then:

DirectoryIndex page.php page.shtml page.html

for the root directory at least. I think the tricky part
is that the request goes to a directory whereas you want
to deliver file. The DirectoryIndex has this kind of fail-
over behaviour that you are looking for AFAIK.

CU, C.