How do I use Redirectmatch to redirect to the other page?

Asked

Viewed 74 times

1

I have an application made in wordpress and I’m making a new one with HTML/CSS and PHP. Inside the folder of this application made in wordpress, has a file called htaccesss, and has the following rule:

# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

<IfModule pagespeed_module>
    ModPagespeed off
</IfModule>

My server has the following folders: Apaguei o nome dos arquivos por uma questão de segurança

Inside the folder 'main' there is a whole web project made with php, and I would like that when the user accessed my site, would go straight to the index.php of the main folder. Currently, when access the site goes to the application made in wordpress.

My question is: How can I manually redirect via htaccess to another folder?

-> I tried using this rule: Redirectmatch ^/$ http://site.com.br/novapasta/

-> I also tried this rule: Redirect 301 /index.php http://www.site.com.br.com/novapasta/index.php

1 answer

1

Hello, you can create a file .htaccess within your public_html with the following redirection.

Redirect /index.html /main/

or... Depending on your project

Redirect /index.php /main/

Source: Dreamhost

Browser other questions tagged

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