apache - htaccess for addon domain and CMS -


.htaccess is doing my head in Any help from resident experts will be greatly appreciated.

Here's a folder structure (it is a CMS, so the folder does not exist, everything has been rewritten by name /index.php?it=fold);

  | --- Home | --- FOLDERONE | --- FOLDERTWO | --- subfolderA | --- subfolderB | --- subfolderC | --- folderThree | I want two domains and the following:  
  • Domain.com should point to the root folder (home) that it does, Standard CMS Setup.
  • domainTwo.com (Aedian domains in cPanel, setup should also point root runs through the document / it also /index.php) / FOLDERTWO redirects should be URL, then again There should be something like writing /index.php?it=folderTwo
  • Extra pages / folders should be accessed with two / subfolder A for example.

    I will consider the following:

      RewriteCond% {HTTP_HOST} domainTwo \ .com $ [NC] RewriteRule ^ $ /index.php?it= FolderTwo [L, QSA] #standard CMS Rewrite: (. *) RewriteRule ^ $ / Index .pp? This = $ 1 [L, QSA]  

    It's driving me crazy, anybody?

I just do not know that adding only path the rest of the URL is no reason < Code> (. *) . I have also added an inquiry to see whether the file already exists or not. This prevents the rule from matching itself (because index.php is present) and prevents the rule from matching various other files, such as images, css or js files.

  RewriteCond% {HTTP_HOST} domainTwo \! .com $ [NC] RewriteCond% {REQUEST_FILENAME} -f RewriteRule ^ $ /index.php?it=folderTwo/$1 [L, QSA] #standard CMS rewrite (*.): RewriteCond% {REQUEST_FILENAME} -f RewriteRule ^ ( . *) $ / Index.php? It = $ 1 [L, QSA]  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -