.htaccess重定向到不同的别名

时间:2017-12-06 04:54:58

标签: .htaccess

我想重定向别名Eg。

http://test.com/mp3https://test.com/audio

我试过这段代码

<FilesMatch "\.(htaccess|zip|rar)$">
Order Allow,Deny
Deny from all
</FilesMatch>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^mp3$ /audio? [L,R=301]
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L,QSA]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

不适合我。问题是,当我在谷歌搜索我的网站并点击任何搜索结果时,它将转到https://test.com/mp3

请帮助

由于 Krishna Karki

0 个答案:

没有答案
相关问题