I have an htaccess question. I wanted to make my URLs more user and
search engine friendly.
These were my old URLs:
http://www.example.com/book.php?title=bacon-essays&part=2
These should become my new URLs:
http://www.example.com/bacon-2.html
The following htaccess on my server root already works (I renamed
"book.php" into "show.php"):
---------
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^(.*)-([0-9]*).html show.php?title=$1&part=$2
---------
NOW, my problems, and your answer would be in fixing those or helping
me in those ways:
1) I included a permanenly moved header in my PHP for the "book.php",
as I now call it "show.php". However the header doesn't work. I asked
in newsgroups etc., so I don't think I can fix what seems to be a
misconfiguration of the Apache server. SO: How can I do this right
within the htaccess-file, the 301 permanent redirect of old URLs (e.g.
those indexed in search engines) to the new format as described above?
(Currently I achieve a 302, temporary move, which I believe is bad for
SEs.)
2.) Now while I was changing the URLs from old to new via htaccess, I
chose a method of "www.example.com/book/bacon-essays-2.html" (an
additional "book"). I just used this for one day or so but our big G.
already indexed this... and now I want to have a permanently moved 301
redirect via htaccess for this as well!
I believe a successful answer might consist of one or two lines,
unfortunately those have to be the right ones... but I'm willing to
try out different suggestions. Thanks from a fellow GAR who's getting
desperate! |