.htaccess - Redirect everything to a single page with htaccess -


i'm total noob in htaccess please keep simple.

on website don't use www.-domain. on subdomain. however, when refer website refer www-section redirect subdomain. done php header() function.

what want redirect on www.jeroened.be subdomain. but, want redirect http://www.jeroened.be/blog http://subdomain.jeroened.be/blog.

the simpliest thing me redirected index.php redirect subdomain.

this should you're asking for. redirects index page.

rewriteengine on  rewriterule . index.php 

you may hit issue though in redirect images, css, etc... index page!

the following folder structure / .htaccess may more appropriate.

  • "app/public" public (all files publicly accessibly go in here - index.php, css, etc...)
  • "app/php" (php files application)

rewriteengine on  # if requested file doesn't exist, redirect request index.php   rewritecond %{request_filename} !-f rewriterule . index.php 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -