http status code 404 - how to redirect a 404 page not found in OpenCart using .htaccess -



http status code 404 - how to redirect a 404 page not found in OpenCart using .htaccess -

on .htaccess:

i tried redirect 404 page about_us page about-us page using line code below

redirect 301 /about_us http://www.example.com/about-us

but when tried load browser about-us page redirect page

http://www.example.com/about-us?_route_=about_us still page in 404 error

here .htaccess rule

rewritebase / #rewriterule ^sitemap.xml$ index.php?route=feed/google_sitemap [l] #rewriterule ^googlebase.xml$ index.php?route=feed/google_base [l] rewriterule ^download/(.*) /index.php?route=error/not_found [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_uri} !.*\.(ico|gif|jpg|jpeg|png|js|css) rewriterule ^([^?]*) index.php?_route_=$1 [l,qsa]

don't utilize redirect rule mod_rewrite rules. have way:

rewriteengine on rewritebase / rewriterule ^about_us/?$ http://www.example.com/about-us [l,nc,r=301] #rewriterule ^sitemap.xml$ index.php?route=feed/google_sitemap [l] #rewriterule ^googlebase.xml$ index.php?route=feed/google_base [l] rewriterule ^download/(.*) /index.php?route=error/not_found [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_uri} !.*\.(ico|gif|jpg|jpeg|png|js|css) rewriterule ^([^?]*) index.php?_route_=$1 [l,qsa]

make sure test in new browser avoid old browser cache.

.htaccess http-status-code-404 opencart

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -