![]() |
|
htaccess 301 redirect - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: htaccess 301 redirect (/thread-9761.html) |
htaccess 301 redirect - jackdaw - 2012-03-09 This is kind of a general question, but I haven't found an answer yet: I'going to move my WP blog and ZP installation to a new domain, and I'm at the point of adding a 301 redirect on my old domain. I found this:
/folderA/ becomes /folderB/ (the zenphoto installation) and all the rest stays the same. So I need three redirections, but I don't know how and in what order. htaccess 301 redirect - acrylian - 2012-03-09 You need to add those afterward that. It is not exactly a redirection technically, its rewriting the url. It's the same server still, isn't it? For SEO reasons you should also take care of with and without www ("Duplicate content").
htaccess 301 redirect - jackdaw - 2012-03-09 Yes, the site will remain on the same server. So would this be ok? `Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^spoenk.nl$ [NC] RewriteRule ^(.*)$ http://www.jacktummers.nl/$1 [L,R=301] RewriteRule ^archives/(.*) http://www.jacktummers.nl/wp-content/uploads/$1 [R=301,L] RewriteRule ^beeldend/(.*) http://www.jacktummers.nl/collectie/$1 [R=301,L]` where htaccess 301 redirect - acrylian - 2012-03-09 Since you already rewrite the domain I think you don't need the full domain again. htaccess 301 redirect - jackdaw - 2012-03-09 Ok, just one more sample then, because it's so important. My old domain existed for ten years , so I don't want to loose any links. `Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^spoenk.nl$ [NC] RewriteRule ^(.*)$ http://www.jacktummers.nl/$1 [L,R=301] RewriteRule ^archives/(.*) wp-content/uploads/$1 [R=301,L] RewriteRule ^beeldend/(.*) collectie/$1 [R=301,L]` htaccess 301 redirect - acrylian - 2012-03-09 Different than the htaccess 301 redirect - jackdaw - 2012-03-12 One more thing... htaccess 301 redirect - acrylian - 2012-03-12 I don't know right now but I guess that does not matter. Zenphoto uses its own 404 page. htaccess 301 redirect - jackdaw - 2012-03-12 Yeah, that makes sense I just thought that placing the errordocument before the rewrite code would make Google skip everything after that (the rewrite rules), thus not using those rewrites. `ErrorDocument 404 /404.html Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^spoenk.nl$ [NC] RewriteRule ^(.*)$ http://www.jacktummers.nl/$1 [L,R=301] RewriteRule ^archives/(.*)?/$ wp-content/uploads/$1 [R=301,L] RewriteRule ^beeldend/(.*)?/$ collectie/$1 [R=301,L]` htaccess 301 redirect - Thomshan - 2012-03-29 how can i redirect my website url to another htaccess 301 redirect - sbillard - 2012-03-29 This is really not the right forum for your question as is is basic WEB stuff. Please see http://en.wikipedia.org/wiki/URL_redirection |