|
| Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Registered
Join Date: Apr 2012
Location: Massachusetts
Posts: 5
Reputation: 0
|
I've got a challenge. I'm revamping my site and I have several of them, so they are all broken into their own happy subdomains. I have decided to use SSI, and it works very nicely... BUT I really don't want to have to use .shtml.
I found a script to include in my .htaccess folder to work around the .shtml issue. AddType text/html .shtml AddHandler server-parsed .html AddHandler server-parsed .shtml Options Indexes FollowSymLinks Includes BUT when I put it into the .htaccess folder in my htdocs folder and drop the s off the .shtml on my test page none of the ssi files work. What am I doing wrong? Does the above code need to go into the .htaccess file INSIDE the subdomain folder? In over my head and needing help, Wendy |
|
|
|
|
|
#2 |
|
Join Date: Nov 2002
Location: Solomons Island
Posts: 3,119
Reputation: 318
|
Do you have separate domain names for each of these 'subdomain sites'? If you do, I believe a .htaccess file in your 'main' htdocs will not apply to the 'subdomain htdocs' if it is reached via it's own domain name. However, if that 'subdomain' is reached thru 'opsusername.powweb.com/directory', a .htaccess file in the 'main htdocs' will be applied. If this is the case, placing a .htaccess file in each subdomain's htdocs directory will do the trick. Actually, try that anyway. I mean, put an individual .htaccess into each subdomain's htdocs..
edit: just note that each one of these statements should begin with "I believe, maybe, ".. ![]()
__________________
-bruce /* somdcomputerguy */ 'If you change the way you look at things, the things you look at change.' Last edited by snowmaker; 4-17-12 at 12:02 PM.. Reason: added the CMA line.. |
|
|
|
|
|
#3 |
|
Registered
Join Date: Apr 2012
Location: Massachusetts
Posts: 5
Reputation: 0
|
OK... I think I caused some confusion. These are technically not "subdomains". What I have are multiple domain names pointing to individual sub-folders within my htdocs folder.
Here is what I have tried: 1. I have included this code in my .htaccess file in my main htdocs folder, and it doesn't parse the SSI when you to to the page. (and it makes sense why this doesn't work since the domain isn't directed to this folder) 2. I have placed the code in my .htaccess file within the subfolder (that the domain name is pointed to) and it STILL does not parse the SSI when you go to the page. I have been using the code below... AddType text/html .shtml AddHandler server-parsed .html AddHandler server-parsed .shtml Options Indexes FollowSymLinks Includes # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Does anyone have any ideas why this isn't working? |
|
|
|
|
|
#4 |
|
Registered
Join Date: Apr 2012
Location: Massachusetts
Posts: 5
Reputation: 0
|
Here is what is in my .htaccess file currently:
AddType text/html .shtml AddHandler server-parsed .html AddHandler server-parsed .shtml Options Indexes FollowSymLinks Includes DirectoryIndex index.html start.html |
|
|
|
|
|
#5 |
|
Mod.. with bite..
Join Date: Sep 2002
Location: Australia
Posts: 7,295
Reputation: 442
|
You are pointing to the /htdocs/subfolders/ via your OPS control panel right? In your first example, you shouldn't need the first block of code in /htdocs/.htaccess and it will probably break Wordpress auto redirects to the 'nearest match'. Only the /htdocs/subfolders/.htaccess should require the first block. You could try it after the Wordpress block but I don't see the need at all.
Heirachy can matter with .htaccess files. The configuration directives found in a .htaccess file are applied to the directory in which the .htaccess file is found, and to all subdirectories thereof. However, it is important to also remember that there may have been .htaccess files in directories higher up. Directives are applied in the order that they are found. Therefore, a .htaccess file in a particular directory may override directives found in .htaccess files found higher up in the directory tree. And those, in turn, may have overridden directives found yet higher up, or in the main server httpd.conf file itself. In basic terms in this case IfModule asks "If" mod-rewrite is enabled on the server and if so attempts to execute the code between the <If...</If tags. AddType typically needs at least RewriteEngine On first at Powweb. /htdocs/.htaccess # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> /htdocs/subfolders/.htaccess RewriteEngine On RewriteBase / AddType text/html .shtml AddHandler server-parsed .html AddHandler server-parsed .shtml Options Indexes FollowSymLinks Includes Experiment with it. Even if you get it working parsing *htm* as php is a sloppy problematic resource heavy way to do things -- much faster all around -- convert the sites/files to php. |
|
|
|
|
|
#6 |
|
Registered
Join Date: Apr 2012
Location: Massachusetts
Posts: 5
Reputation: 0
|
Still no luck getting .html files to parse. I have the following code in my htdocs/subfolder(domain is being pointed to this folder)/.htaccess file:
RewriteEngine On RewriteBase / AddType text/html .shtml AddHandler server-parsed .html AddHandler server-parsed .shtml Options Indexes FollowSymLinks Includes PLEASE NOTE: When using the code stated above, if I give a URL ending with a trailing slash (domain/folder/) nothing is being parsed, even when it is a .shtml file. HOWEVER When typing in the URL (domain/folder/index.shtml) page loads like a champ KILL THEM ALL If I kill everything in my .htaccess file, going to (domain/subfolder/) parses like a champ. Thanks for your time, please advise |
|
|
|
|
|
#7 |
|
Registered
Join Date: Apr 2012
Location: Massachusetts
Posts: 5
Reputation: 0
|
Gave up on .htaccess. We have moved on to php... seems to work OK that way.
|
|
|
|
![]() |
| Thread Tools | |
|
|