Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Route subdomain to a specific controller using mod_rewrite
  • Hi,
    i saw this discussion http://fuelphp.com/forums/discussion/10586

    I tried to route a subdomain to a specific controller with mod_rewrite inside .htaccess but it doesn't work.

    Exemple :
    i want to make an invisible redirection of my subdomain :
    news.website.com -> www.website.com/news

    My .htaccess
    ------------------------
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{HTTP_HOST} ^news\.website\.com$ [NC]
    RewriteRule ^(.*)$ index.php/news [NC,L]


    But news.website.com always go to www.website.com

    Somebody can help me?
    Thanks


  • You can enable rewrite logging to see exactly what is rewritten, and where your logic fails.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion