0
Welcome Guest! Login
0 items Join Now

Redirect of a subfolder to a different site

    • ZioRiP's Avatar
    • ZioRiP
    • Hero Rocketeer
    • Posts: 282
    • Thanks: 0

    Redirect of a subfolder to a different site

    Posted 11 years 1 month ago
    • Hello everybody.
      I remember I used to do this procedure in one of my old sites made with IP.Board.
      On joomla it seems to create a server error.

      I need to have my domain.com/youtube taking me to my youtube channel, but as far as I try I cannot make it.
      I am sure it is due to the fact that joomla uses the url rewrite engine on its own way, which I don't know as I am a very newbie.

      Could anyone, please help me?
      Is there a way to make this youtube redirection working from mysite.com/youtube?

      Thanks in advance :)
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 22291
    • Thanks: 3228
    • messin' with stuff

    Re: Redirect of a subfolder to a different site

    Posted 11 years 1 month ago
    • make a menu that's published by not assigned anywhere... create a menu item > external link and make the menu's alias "youtube"
    • Last Edit: 11 years 1 month ago by Matt.
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
    • ZioRiP's Avatar
    • ZioRiP
    • Hero Rocketeer
    • Posts: 282
    • Thanks: 0

    Re: Redirect of a subfolder to a different site

    Posted 11 years 1 month ago
    • Thanks, I managed to do it through the .htaccess file.
      The website is closed now and should already redirect to youtube.
      In case anyone else needs to achieve the same result here's my code:
      RewriteCond %{HTTP_HOST} ^domain.com/youtube [NC]
      RewriteRule ^(.*)$ https://www.youtube.com/channel/mychannel/$1 [L,R=301]
      
      Redirect 301    /youtube    https://www.youtube.com/channel/mychannel

      Obviously "youtube" cannot be used as alias anymore

Time to create page: 0.075 seconds