.htaccess - htaccess rewrite URL from subdirectory -


i've been trying set rewrite rule in our htaccess. have search component directs url:

http://www.domain.co.uk/component/search?searchword=word&searchphrase=all&start=10 

we'd show as:

http://www.domain.co.uk/search/word/10 

i've been trying no avail far, have.

rewriteengine on rewriterule ^search/([^/]*)/([^/]*)$ /component/search/?searchword=$1&searchphrase=all&start=$2 [l] 

is there missing? other rules interfering it?

at least should escape slashes , question mark

rewriterule ^search/([^/]*)/([^/]*)$ /component\/search\/\?searchword=$1\&searchphrase=all\&start=$2$ [l] 

and should not put ampersands (&) in query string - use %26 or & instead...


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -