Md Dang
Md Dang

Reputation: 131

redirect htaccess single page with php parameters

I need to redirect 1 single page with .htaccess but i can't figure it out

examp.co/?language=en

should redirect to

examp.co/bla/

the index.php is hidden here because it has already been redirect to root /.

Upvotes: 1

Views: 97

Answers (1)

anubhava
anubhava

Reputation: 785146

Enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory:

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteCond %{QUERY_STRING} ^language=en(&|$) [NC]
RewriteRule ^$ /bla/? [L,R=301]

Upvotes: 1

Related Questions