httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Shoberg" <jshob...@cbd.net>
Subject RE: mod-rewrite - moving a website ....
Date Mon, 04 Feb 2002 04:25:20 GMT
This should do it ! Thanks :)

I would like it applied to every static .html URL from the server root.
This worked great, but is there a way to change it so it erwrites everything
except the index.html page?  I presume apache uses perl5 style regexp ?

Thanks



-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Sunday, February 03, 2002 11:15 PM
To: users@httpd.apache.org
Subject: RE: mod-rewrite - moving a website ....



> From: Jon Shoberg [mailto:jshoberg@cbd.net]


> Is my understanding correct that mod_rewrite can take a request for
> /page1.html and internally make a request to
> /articles/viewdoc.php?v=page1.html such that it is transparent to the
> browser-agent?  Could someone provide a simple example of this?

Yep.  Something along the lines
RewriteEngine On
RewriteRule ^/(.*)\.html /articles/viewdoc.php?v=$1.html

You don't mention exactly which pages you want this rule to apply to.  I've
written it so that it will apply to ever .html on the site.

Use the RewriteLog to help you find tune things.

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


---------------------------------------------------------------------
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


Mime
View raw message