apache - htaaccess with parameters and base URL change -
have 2 rewrite rules racking brain combine. basically, want following re-write rule transform parameter url string like
the original url: https://example.com/?language=english
the rewritten url: https://example.com/english
rewriterule ^([^/]*)$ /?language=$1 [l]
i have covered. trying figure out in rule, how can change base url example.com
example2.com
?
this how change urls 301 redirect..
rewriterule ^(.*)$ https://mywebsite/$1 [r=301]
just not sure how combine two? been experimenting while.
edit: have modified there no need modify base url longer. can rewrite.
so input url: http://example.com/redirect/index.php?language=english , desired output url: http://example.com/english/
i have placed .htaacess inside of /redirect directory this:
rewriteengine on rewriterule ^([^/d]+)/?$ index.php?language=$1 [qsa]
Comments
Post a Comment