简体   繁体   中英

performing a redirect in joomla1.5

I have a situation in joomla in which I have to write the .htaccess file for redirects, such that if I type http://mysite.com/fold2 , it should redirect to http://mysite.com/fold1/fold2 , but the URL should be like mysite/fold2 .

Could you also tell me where is the best place in the .htaccess file to write this code? Currently I think it is after:

RewriteEngine On      

If you want to redirect using PHP, then add this code you the index.php file:

<?php
header("Location: http://yourdomain.com/");
exit;
?>

If you want to redirect using .htaccess, then I believ this will work

Redirect 301 / http://yourdomain.com/

Hope this is what you are looking for

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM