What to do with Question Marks in HTAccess Redirects

If it's a single link you want to change you don't need a htaccess rule for that you can just do a redirect.

redirect 301 /wordpress/?p=250

If the URL parameter changes you can use this rule.

RewriteEngine on
RewriteRule ^wordpress/(.*)
http://www.othersite.com/blog [R=301,QSA,NC,L]

Note that when you use the QSA flag it will append the URL with the query parameter so if that's what you want the resulting URL will be.


Otherwise if you remove the QSA flag, then it will just redirect to this


Related to : What to do with Question Marks in HTAccess Redirects
Replacing question marks and equal signs with htaccess
This rule should take care of recursively replacing each / with = and finally making it a nice Query String: RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?(.*)$ $1/$2=$3&$4 [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}/$1.php -f RewriteRule ^([^/]+)/([^/]+)$ $1.php?$2 [L,QSA] You need to comment out or delete this rule: # RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ /$1.php?$2=$
.htaccess writerule to remove question marks and equal mark
RewriteEngine on # do not affect files RewriteCond %{REQUEST_URI} !(..{2,4})$ RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^(.*)$ index.php?parameter1=$1&%1 [L] Something like that perhaps?
MySQL - question marks
Your database table column should be created with proper charset and collation. You can define theit while creating or altering a table: col_name {CHAR | VARCHAR | TEXT} (col_length) [CHARACTER SET charset_name] [COLLATE collation_name] Here is the mysql link to help you learn more about it: http://dev.mysql.com/doc/refman/5.0/en/charset-column.html
Getting question marks when trying to get data from API
Have a look here: jQuery doesn't display Hebrew And be totally sure first that your JSON files are actually enconded in UTF-8 You might want to check how your server is serving those JSON and which codification they have. Check also this link: http://dougal.gunters.org/blog/2012/03/14/dealing-with-utf-in-node-js/ Quick overview: “V8 currently only accepts characters in the BMP as inp
PHPUnit outputs only question marks
Just adding this as an answer since it looks like at least my solution helped one other person. If you are running into this issue it is highly likely due to the version of php having dectect_unicode turned on. You can simply modify your php.ini file to have detect_unicode = Off and the output should be shown properly. http://php.net/manual/en/ini.core.php#ini.zend.detect-unicode for more info.

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