Mega list of redirects (.htaccess)
|
07-04-2010, 08:11 AM,
(This post was last modified: 01-04-2011, 08:09 PM by HiddenKnowledge.)
|
|||
|
|||
Mega list of redirects (.htaccess)
well lets start
but before we do red this lil snippet notes on htaccess redirection
Quote:Always be sure to upload .htaccess files in ascii mode, sending it up as binary will break it (and usually make your server very, very unhappy.) ok now lets begin are 1st one is 301 sounds crazy but lets go at it for an single page Code: Redirect 301 /oldpage.html http://www.example.com/newpage.html now for an entire site you do this Code: Redirect 301 / http://www.example.com/ now to change the end of it Code: RedirectMatch 301 (.*)\.html$ http://www.example.com$1.php Quote:This example is perfect if you've decided to switch to .php from .html pages. It will look for any .html page and redirect it to .php (ie http://www.example.com/yourpage.html and redirect it to http://www.example.com/yourpage.php). Now, be careful with this, it does mean any html page. I did this on one of my sites and had totally forgotten I had an iframe with .html content on some pages... I didn't notice for weeks that it was broken :S. The most common meta redirect is Code: meta http-equiv="refresh" content="10; url=http://example.com/"> if i missed an feel free to say so |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Mega list of redirects (.htaccess) - by Mone - 07-04-2010, 08:11 AM
RE: Mega list of redircts - by RichardGv - 07-04-2010, 01:04 PM
RE: Mega list of redircts - by HiddenKnowledge - 07-06-2010, 09:22 PM
|