301 redirect with ? (question mark) not working in htacces

You can't match against the query string in a Redirect statement, use mod_rewrite and match against the %{QUERY_STRING} var:

RewriteEngine On
RewriteCond %{QUERY_STRING}
RewriteRule ^order/order.html$
http://www.domain.nl/? [L,R=301]

But since you have like 8000 URLs that start with the query string ?AddID=, then you can just match against that:

RewriteEngine On
RewriteCond %{QUERY_STRING} ^AddID=[0-9]
RewriteRule ^order/order.html$
http://www.domain.nl/? [L,R=301]

Related to : 301 redirect with ? (question mark) not working in htacces
Redirect 301 htacces with question mark 404 file not found
Not so much used to Redirect, but with RewriteRule, you could go like this : RewriteEngine on RewriteCond %{QUERY_STRING} ^nav=3&id=106$ RewriteRule ^fr/verhuur_details.asp$ /fr/location/knikarm? [R=301,L] This should work. Note : if you want keep query string after redirect, you'll need to delete ? at the end : RewriteEngine on RewriteCond %{QUERY_STRING} ^nav=3&id=106$ RewriteRule
Removing question mark ? from subfolder URL in htacces wp
How about something like this: RewriteEngine On RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /(.+)?( |$) RewriteRule ^(.*)$ /$1? [L,R=301] You'd put those rules in the htaccess file in your document root.
URL redirect not working for contains question mark "?" in the url in magento
dot (.) is not the really good character to put in a url parameters and it is most probably that that makes things go wrong. you can probably use underscore (_) or some other thing. If you really need to use a dot, you should have a look to : http://stackoverflow.com/a/16999694/2660794
how to redirect. old url to new url. [Laravel, htacces]
You could make a route that catches all routes that are not in your routes.php. It has to be in the bottom of your routes.php file. Here you can check if id exists and if the uri contains main.php. Route::get('{uri}', function($uri) { $id = Input::get('id'); if(preg_match('/main.php/i', $uri) && isset($id)){ return Redirect::to('http://www.example.com/n/'.$id); }else
.htacces redirect when $1 is empty
Tweak your regex to support 0 or more characters instead of 1 or more characters. Try this rule: Options +FollowSymlinks RewriteEngine On RewriteRule ^shop/([^/.]*)/?$ /shop.php?url=$1 [L]

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .