I want to convert url using GET method from

http://localhost/demo/index.php?keyword=sap&Submit=Search

TO

http://localhost/demo/sap

but i am getting problem in rewriting url i.e unable to rewrite url to

http://localhost/demo/sap

i have written my htaccess as

RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?keyword=$1


Please help me to get the proper htaccess code...

Thankyou

<form name="frmSearch" method="GET" action="">
		 
		<div class="input">
			<label for="SearchKeyword">Search Results:</label>
			<input name="keyword" id="SearchKeyword" type="text" value="<?php echo $_GET['keyword']; ?>">
		</div>
		<div class="submit">
			<input value="Search" type="submit" name="Submit">
		</div>
	</form>

Recommended Answers

All 2 Replies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.