The actually URL which my app uses is:
but I would like it to be possible to achieve the same with
I have no experience of rewrite rules, how can I set this up?
The solution has worked but the new URL is displayed in the address bar. I thought it would have been possible to set this up so that it appears as though the page location is
without changing to display
Is this possible? Thanks.
Mod_rewrite: How do I omit subdomains from rules?
Using RewriteRule in .htaccess for POST request
htaccess 301 redirect rule
Should do the trick..
RewriteEngine on Options +FollowSymlinks RewriteBase / RewriteRule ^(.*) search.php?search=$1 [R]
htaccess rule is passing innecesary variable
I would suggest however that you make it a bit more specific, so maybe require the user of a search directory in your url.
.htaccess rewrite with REST style URL 500 error
eg instead of mysite.com/IPhone use mysite.com/search/IPhone which would work like.
advance url rewriting [closed]
This makes it easier to have normal pages that arnt redirected, such as about us or a basic homepage..
RewriteEngine on Options +FollowSymlinks RewriteBase / RewriteRule ^search/(.*) search.php?search=$1 [R]
.htaccess for addon domain
As Chris says, this is not PHP but Apache that does this, and whether it works can depend on your hosting setup..
Include file (header) using htaccess
mod_rewrite) or whatever server you're using.
For Apache, you need on the server to have a file called
.htaccess, and in it put something like:.
RewriteEngine on RewriteRule ^(\w+)/?$ /index.php?search=$1
^(\w+)/?$is a regular expression - it matches any word of 1 or more characters, followed by a
So it changes
Sound about right?.
RewriteEngine on RewriteRule /(.*) /search.php?search=$1