I want to change the links on my site so they look better. e.g. Instead of this: http://books.google.com/googlebooks/about.html I want it to be like: www.mysite.com/googlebooks.php How can I do this using php? I think its also possible using .htacces. Is that better? Is PR passed on using these methods?
I don't understand your two links comparisons... http://books.google.com/googlebooks/about.html www.mysite.com/googlebooks.php
I want the links to redirect from my site. e.g. like the top 10 list here: http://www.pokerlistings.com
okay I think I'm starting to understand, so you just want to link from a PHP page to Any website? <?php header("Location: http://forums.digitalpoint.com"); ?> PHP: Put that in any PHP page and it'll redirect to DP... Was this what you wanted?
I'm not sure if that is what I need. Basically I want my long href links to link with nice urls and not to pass PR.
The way that quangvan described doesnt help you if you want to have a PR on that page as it redirects immediately. If you want to do that you will need to have a javascript redirect really, and a link on that page if the users javascript is disabled take a look at http://www.tizag.com/javascriptT/javascriptredirect.php
honestly I have no idea what you want fadetoblack22 the length of your url has nothing to do with pagerank. So you want to just make the url's shorter? sounds like you need mod_rewrite .htaccess, like wordpress url's correct?
The example of what I want is in the http://www.pokerlistings.com top 10 list. I will look into the .htaccess to see if it is what I need.
well since that just redirects directly, you can use just .htaccess. This is how it is done .htaccess # Set up the rewrite engine RewriteEngine On RewriteBase / # create rule for googlebooks RewriteRule ^googlebooks\.php$ http://books.google.com/googlebooks/about.html [R=301,L] Code (markup): Jay
I personally like to use a combination of the two: In .htaccess, RewriteRule ^pages/([a-z]+)$ redirect.php?slug=$1 [NC,QSA] In redirect.php, <? if($slug == 'googlebooks'){ header 'Location: http:google/stuff'; } ?> Doing it this way, you can easily save all your links in the database. Or, if you only have a few the if/else will work. Also, you can do click tracking and other nifty things. yoursite/pages/googlebooks will redirect you
This is another example: http://www.pokerteam.com The "Online Poker Room Comparison Chart" type of links is what I am looking for.