Mod_rewrite question
Hi all,
I load mod_rewrite on the httpd.conf file. Now, how do I test to see if it work correctly? Thanks |
Put in a rewrite rule in the httpd.conf file:
RewriteEngine on ReWriteCond condition to match here ReWriteRule what you wanna do here |
where would be the right place?
I've always done Rewrite rules inside virtuls. but this box doesn't have (or need) any. so where do I put the rewrite rules? thanks.
|
One of the examples in the docs at http://httpd.apache.org/docs/2.0/misc/rewriteguide.html has the following (I've removed the comments):
Code:
UseCanonicalName on |
You can also throw them into an .htaccess file for easier editing access than in httpd.conf
|
Thanks
I threw it into the <directory> it accepted the actual Rewrite rules and Rewrite on, but I had some rewrite log configurations and log level and it said they can't be there. and needless to say it did nt work.
I've always been told that putting it in the server conf is way more efficient, and also that .htaccess files are more error prone but I'm totally OK with using .htaccess on the dev box. For me it is much of a muchness. I own the colo server where there are virtuals, and the dev box where there arent. |
All times are GMT -5. The time now is 09:52 PM. |