.htaccess - RewriteRule for URLS with attributes -



.htaccess - RewriteRule for URLS with attributes -

i have on 100 pages has ton of urls this:

product_reviews_write.php?products_id=111 product_reviews_write.php?products_id=119 product_reviews_write.php?products_id=86 product_reviews_write.php?products_id=87 product_reviews_write.php?products_id=88 etc...

i redirect pages start /product_reviews_write.php website homepage /.

i tried this, rewrite includes after ? in url.

rewritecond %{http_host} ^url\.com$ [or] rewritecond %{http_host} ^www\.url\.com$ rewriterule ^product_reviews_write\/?(.*)$ "http\:\/\/www\.url\.com\/" [r=301,l]

the result www.url.com/product_reviews_write/?products_id=88.

any ideas? time , help!

just add together ? @ end:

rewritecond %{http_host} ^(www\.)?url\.com$ rewriterule ^product_reviews_write\.php http://www.url.com/? [r=301,l]

and can combine 2 conditions.

.htaccess redirect http-status-code-301

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 -