Can i set a 301 redirect into a rewrite rule?
eg can i set a 301 redirect into this code?
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang=$1$4 [L,E]
Can i set a 301 redirect into a rewrite rule?
eg can i set a 301 redirect into this code?
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang=$1$4 [L,E]
If you just want Apache to treat your static URL as something your PHP script is interested in, you should not need to set a 301 response code for your static page. A 3xx response code is only used when you're redirecting somebody from page A to page B with a change in the URL.
For some reason this redirects to the dynamic url and not the static url which i want it to direct to. Thanks for that but please tell me how to set it to the static url.
so what do you reccommend? I hav be enabled static urls and i do not want the previous urls to which are dynamic to be indexed. Which ever url is used to accesd the site i want people to be directed to the newest static url.