Bad Credit Mortgages - Loans - Credit Report - Car Insurance - Mortgage Calculator

PDA

View Full Version : mod-rewrite Content Handling code doesn't work


miko67
Apr 16th 2005, 12:00 am
Why doesn't this work?

RewriteEngine on
RewriteBase /~quux/
RewriteRule ^bogforingsprogram-bogforings-system\.html$ bogfoeringsprogram-bogfoerings-system.html [R]
RewriteRule ^gratis-bogforingsprogram\.html$ gratis-bogfoeringsprogram.html [R]
RewriteRule ^pris-paa-bogforing\.html$ pris-paa-bogfoering.html [R]

It's been made like stated here in the "Content Handling (http://content%20handling/)" section in http://httpd.apache.org/docs-2.0/misc/rewriteguide.html but doesn't work at all.

I also made a general rewrite like this:

RewriteEngine on
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^bogholderiet\.frac\.dk
RewriteRule ^(.*)$ http://www.bogholderiet.frac.dk/$1 (http://www.bogholderiet.frac.dk/$1) [R=permanent,L]

that works like a charm...

Nicky21
Apr 16th 2005, 6:46 am
I haven't mastered mod_rewrite, but i've worked with it a little. I tried a trial and error approach and finally managed to make it work.

You might want to try the [RE] command while testing. As fas as i can remember it will redirect the old url to the new url in the browser itself, so if a redirect works, you'll be able to see it in your browser window!

miko67
Apr 16th 2005, 8:48 am
You might want to try the [RE] command while testing.Thx, could you elaborate a little or refer me to a quality page on this topic? I don't really know what the [RE] thing stands for :p