I get the wrong URLs in i.e., but not in Firefox and Chrome.
Essentially, I have a text box called text-search. I use jQuery and rewriterule in htaccess to internally redirect pages. I am on a local host and all the files are in a folder called test.
In Firefox and Chrome, if you type "hello", press "enter", "hi", press "enter" and "goodbye", press "enter" in the text search box, and you will get the correct URLs:
local / test / testing / hi
as well as
local / test / testing / hi
as well as
local / test / testing / goodbye
repectively.
That is, you get
local / test / testing / hi
as well as
local / test / testing / testing / hi
as well as
local / test / testing / testing / testing / goodbye
respectively
, "" . .. .
HTML JQuery
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<base href="http://localhost/test/" />
<script src="jQuery.js"></script>
<script>
$(document).ready(function(){
$("#text-search").keyup(function(e){
if (e.keyCode == 13){
window.location.replace("testing/"+$('#text-search').val());
}
})
})
</script>
</head>
<body>
<input type='text' id='text-search'>
</body>
</html>
.htaccess
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^testing/(.+)$ /test/testing.php?string=$1 [L]
.