You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ed Lazor <os...@atfantasy.com> on 2002/02/07 05:29:38 UTC
help with mod_write
One of my friends had come up with a mod_rewrite expression that we were
using on the server... I had to rebuild the server last night and lost the
httpd.conf file in the process :( He's not available and my web site is
broken :( Your help is very much appreciated.
The goal: any web page request without a period in it should be redirected
to /index.php
My attempt... isn't working... I tried reading the manual and came up with:
RewriteEngine On
RewriteRule !^\.*$ /index.php [L]
No idea what's wrong with it, but the result is bringing up a page and then
automatically going to a different page. Pretty weird.
It would be awesome if you could explain how to do this.
Thanks,
-Ed
ps... sorry if I sent this to the list twice... I'm subscribed at work and
automatically sent this message only to discover I wasn't subscribed here
at home...
---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
RE: help with mod_write
Posted by Joshua Slive <jo...@slive.ca>.
> From: Ed Lazor [mailto:osmosis@atfantasy.com]
>
> I've continued trying to figure it out and found a regex tutorial... I
> think I may have figured it out, but wanted to see what you thought. Is
> this the best approach?
>
> RewriteRule ![\.] /index.php$1 [L]
It's fine if it works. My guess would be:
RewriteRule ^/([^.]*)$ /index.php/$1 [L]
[^.] stands for "any character except "." (where we note that inside a [],
the dot is a literal period) and * means zero of the preceding character.
Joshua.
---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: help with mod_write
Posted by Ed Lazor <os...@atfantasy.com>.
I've continued trying to figure it out and found a regex tutorial... I
think I may have figured it out, but wanted to see what you thought. Is
this the best approach?
RewriteRule ![\.] /index.php$1 [L]
Thanks in advance =)
At 08:29 PM 2/6/2002 -0800, you wrote:
>One of my friends had come up with a mod_rewrite expression that we were
>using on the server... I had to rebuild the server last night and lost the
>httpd.conf file in the process :( He's not available and my web site is
>broken :( Your help is very much appreciated.
>
>The goal: any web page request without a period in it should be
>redirected to /index.php
>
>My attempt... isn't working... I tried reading the manual and came up with:
>
> RewriteEngine On
> RewriteRule !^\.*$ /index.php [L]
>
>No idea what's wrong with it, but the result is bringing up a page and
>then automatically going to a different page. Pretty weird.
>
>It would be awesome if you could explain how to do this.
---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org