301 Redirect not working

#1
Hi

I am trying to get a 301 redirect working for a single page and currently it is not. I am trying to understand if this is because of some interaction with LiteSpeed Cache

I have tried adding this to the htaccess file
Code:
Redirect 301 "/old-page.html" "/new-page.html"
This didn't work, so I removed this and tried setting a redirect via cpannel. This added the following to htaccess
Code:
RewriteCond %{HTTP_HOST} ^d8tadude\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.d8tadude\.com$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^2016\/09\/06\/3par\-simulator\-download$ "https\:\/\/d8tadude\.com\/2017\/12\/05\/3par\-simulator\-setup" [R=301,L]
In both cases this was unsuccessful. It was added to the end of the htaccess file below any Litespeed entries

Any ideas?

Thanks
 
Last edited by a moderator:

NiteWave

Administrator
#2
yes, looks still not working
~>curl -IL d8tadude.com/2016/09/06/3par-simulator-download
HTTP/1.1 301 Moved Permanently
Date: Fri, 08 Dec 2017 03:26:26 GMT
Connection: keep-alive
Cache-Control: max-age=3600
Expires: Fri, 08 Dec 2017 04:26:26 GMT
Location: https://d8tadude.com/2016/09/06/3par-simulator-download
Server: cloudflare-nginx
CF-RAY: 3c9c9f8a35079b68-DFW

HTTP/1.1 301 Moved Permanently
Date: Fri, 08 Dec 2017 03:26:27 GMT
Connection: keep-alive
Set-Cookie: __cfduid=d2163c79b6b4b84b7f6ce1488a3c2d88e1512703587; expires=Sat, 08-Dec-18 03:26:27 GMT; path=/; domain=.d8tadude.com; HttpOnly
Accept-Ranges: bytes
Location: https://d8tadude.com/2017/12/05/3par-simulator-setup/
X-Turbo-Charged-By: LiteSpeed
Server: cloudflare-nginx
CF-RAY: 3c9c9f8c2c291fac-DFW

HTTP/1.1 200 OK
Date: Fri, 08 Dec 2017 03:26:28 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Set-Cookie: __cfduid=d2163c79b6b4b84b7f6ce1488a3c2d88e1512703587; expires=Sat, 08-Dec-18 03:26:27 GMT; path=/; domain=.d8tadude.com; HttpOnly
X-Powered-By: PHP/7.0.26
X-Pingback: https://d8tadude.com/xmlrpc.php
Link: <https://d8tadude.com/wp-json/>; rel="https://api.w.org/"
Link: <https://wp.me/p8w0Rs-1gu>; rel=shortlink
X-LiteSpeed-Cache: hit
Accept-Ranges: bytes
X-Turbo-Charged-By: LiteSpeed
Server: cloudflare-nginx
CF-RAY: 3c9c9f8f0edb1fac-DFW
It was added to the end of the htaccess file below any Litespeed entries
hoow about move above rules on top of .htaccess ?
 

Tishu

Well-Known Member
#3
Hello,
You can try:
Code:
Redirect 301 /2016/09/06/3par-simulator-download https://d8tadude.com/2017/12/05/3par-simulator-setup
or
Code:
Redirect 301 /d8tadude.com/2016/09/06/3par-simulator-download https://d8tadude.com/2017/12/05/3par-simulator-setup
 
Last edited by a moderator:
Top