Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

#$#@$#@!$ mod_rewrite


2:21 pm on Jun 25, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 28, 2003
votes: 0

For the life of me, I cant get my head around mod_rewrite. Here is what I have:
Options All
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule blah /dir/page.jsp [R=301,L]
All I want to do, is if someone clicks on a link that is www.mydomain.com/blah.htm its redirected to www.mydomain.com/dir/page.jsp. Where .jsp dynamically generates a page.

It seems to work, but it returns:

HTTP/1.1 302 Found
Date: Wed, 25 Jun 2003 01:05:21 GMT
Server: Apache/1.3.26 (Unix) mod_perl/1.26 PHP/4.2.3
Location: [mydomain.com...]
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

Which I would prefer to be a 301 for the GoogleBot, correct?


2:40 pm on June 25, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 21, 1999
votes: 0

Try redirecting to a static page and see if the headers show a 301. If so, you should be swearing at Java (although mod_rewrite often deserves it too!) and figuring out how to return a 301 from the dynamic page.