Allways wanted to know how you can fix your url’s, when you push vars to it? We all know google don’t like url’s that look like this:
http://www.dotflow.nl/photo.php?album=new&photo=1
Marten from Youngstones gave me a tip about fixing this problem using only the .htaccess file!
Add this to your .htaccess file:
RewriteEngine On RewriteRule index.html /index.php RewriteRule (.*)/(.*).html /photo.php?album=$1&photo=$2
Your url now will look like this:
http://www.dotflow.nl/albumname/photoname.html
If you want to keep the photo.php but without .php modify the last line into this:
RewriteRule photo/(.*)/(.*).html /photo.php?album=$1&photo=$2
Your url now will look like this:
www.dotflow.nl/photo/albumname/fotoname.html
RSS feed for comments on this post. TrackBack URL
September 29th, 2009 at 11:51
Is it really this easy?? amazing how things so small, have such a big effect!
October 1st, 2009 at 17:03
I was looking for this, ty!