PDA

View Full Version : Getting SEO to work on 1and 1 servers


steveblue
01-21-2007, 10:18 PM
Hello all,
I run this script on 1and1 shared hosting, and the defualt htaccess file does not work correctly with their setup. With a bit of headsratching, I have finally got it to work :). Here is what you need to have in your htaccess file to get it to work with 1and1 servers;



Options +FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteRule ^(.*)/$ index.php?category=$1 [QSA,L]
RewriteRule ^(.*)/index([0-9]+).html$ index.php?category=$1&page=$2 [QSA,L]

RewriteRule ^new-links.html$ new-links.php [QSA,L]
RewriteRule ^new-links([0-9]+).html$ new-links.php?page=$1 [QSA,L]

RewriteRule ^top-links.html$ top-links.php [QSA,L]
RewriteRule ^top-links([0-9]+).html$ top-links.php?page=$1 [QSA,L]

RewriteRule ^popular-links.html$ popular-links.php [QSA,L]
RewriteRule ^popular-links([0-9]+).html$ popular-links.php?page=$1 [QSA,L]

RewriteRule ^editor-links/index.html$ editor-links.php [QSA,L]
RewriteRule ^editor-links/index([0-9]+).html$ editor-links.php?page=$1 [QSA,L]

RewriteRule ^(.*)/(.*)-l([0-9]+).html$ view-link.php?cat=$1&title=$2&id=$3 [QSA,L]




Hope that helps.
Steve

John Turner
01-22-2007, 10:08 AM
Hi steveblue and welcome,

I am glad you got it.