Redirect file to URL via . htaccess

Asked

Viewed 931 times

2

I am using UOL Host for my website and am having problems redirecting the homepage to a subdomain I created. Researching how to do this, I found that the way to do this would be:

Redirect 301 /index.php http://subdominio.meudominio.com.br

My index php. has another name. And the site link is in this style, but are other words.

I put . htaccess in the same directory as index.php, but it doesn’t work when I access the link. Can anyone help me?

2 answers

0

See if it works:

redirect 301 http//dominio.com http://subdominio.dominio.com

0

  • I think just the line Rewriterule (.*) http://site.example.com/%1 [R=301,L] does not work. I tried what is in this link you sent, but it did not work. My case is a little different from the other guy’s case. I tried that: Rewriteengine on Rewritebase / Rewritecond %{HTTP_HOST}%{REQUEST_URI} (www.)? meusite.com.br/nome_pasta_contem_php_initial/(.) Rewriterule (.) http://subdominio.meusite.com.br/%1 [R=301,L] Rewriterule ([ /.]+)$ /name_pasta_contem_php_inicial/php_inicial.php/? var=$1 [L]** But I’m following the link guy example. I don’t use this var=$1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.