regex - redirect htaccess not working -
im trying redirects site inherited, didnt build original htaccess
currently when click in link in google takes me 404 landing page , whereas want take me about_us page...
rewritebase / rewriterule ^showroom$ index.php?route=showroom/showroom [l] rewriterule ^blog$ index.php?route=blog/home [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] rewriterule ^about$ https://www.example.ie/about_us/ [r,l]
you need maintain redirect rules before internal routing ones:
rewriteengine on rewritebase / rewriterule ^about$ https://www.example.ie/about_us/ [r,l] rewriterule ^showroom$ index.php?route=showroom/showroom [l] rewriterule ^blog$ index.php?route=blog/home [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]
regex apache .htaccess mod-rewrite redirect
No comments:
Post a Comment