Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
301 redirects problem
#14
I have  a question about my last post.

My .htaccess now looks like this

Code:
RewriteCond %{REQUEST_URI} /articles/diy-horizontal-warping-mill/
RewriteRule (.*) /articles/horizontal-warping-mill/ [R=302,L]
RewriteCond %{REQUEST_URI} /articles/diy-horizontal-warping-mill
RewriteRule (.*) /articles/horizontal-warping-mill/ [R=302,L]

RewriteCond %{REQUEST_URI} /articles/diy-simple-tension-device/
RewriteRule (.*) /articles/simple-tension-device/ [R=302,L]
RewriteCond %{REQUEST_URI} /articles/diy-simple-tension-device
RewriteRule (.*) /articles/simple-tension-device/ [R=302,L]

This is working but, is this OK or is there another way I should be writing this? I found out that the "from" URL matters if there's a trailing slash or not so I created these rules to cover both scenarios.
Reply


Messages In This Thread
301 redirects problem - by Rob1n - 2015-02-25, 00:13:55
RE: 301 redirects problem - by PauliOpa - 2015-02-25, 02:40:07
RE: 301 redirects problem - by Rob1n - 2015-02-25, 03:08:19
RE: 301 redirects problem - by shawn_a - 2015-02-25, 04:54:59
RE: 301 redirects problem - by Rob1n - 2015-02-25, 19:25:24
RE: 301 redirects problem - by shawn_a - 2015-02-26, 00:17:09
RE: 301 redirects problem - by Rob1n - 2015-02-26, 00:21:37
RE: 301 redirects problem - by shawn_a - 2015-02-26, 00:44:22
RE: 301 redirects problem - by Rob1n - 2015-02-27, 19:52:53
RE: 301 redirects problem - by joyofweaving.com - 2017-03-12, 18:34:06
RE: 301 redirects problem - by joyofweaving.com - 2017-03-12, 19:30:19
RE: 301 redirects problem - by shawn_a - 2015-02-27, 23:03:14
RE: 301 redirects problem - by Rob1n - 2015-03-02, 20:06:08
RE: 301 redirects problem - by shawn_a - 2015-03-03, 00:01:02



Users browsing this thread: 1 Guest(s)