| Joomla! http://forum.joomla.org/ |
|
| DISCUSSION: Guide to .htaccess http://forum.joomla.org/viewtopic.php?f=237&t=88828 |
Page 1 of 1 |
| Author: | yana [ Tue Jul 25, 2006 9:44 am ] |
| Post subject: | DISCUSSION: Guide to .htaccess |
[size=100]EDIT: MOD NOTE This is the discussion for the topic located here: Discuss topic located here: http://forum.joomla.org/index.php/topic,79277.0.html[/size] I would like to know how I can use .htaccess to show my domain name only with WWW. The hoster use domain names without WWW by default and I have a problem with Java Script sometimes... |
|
| Author: | emagin [ Mon Jul 31, 2006 4:05 pm ] |
| Post subject: | Re: DISCUSSION: Guide to .htaccess |
Just a quick note on register_globals=OFF In several hosted environments I have found they run PHP in CGI mode, which means you cannot set any traditional php.ini parameters from .htaccess. It craps out. Here is a thread where I explain how to do this in hosted php/cgi mode environments: http://forum.joomla.org/index.php/topic ... #msg394932 |
|
| Author: | Elpie [ Tue Aug 01, 2006 1:31 pm ] |
| Post subject: | Re: DISCUSSION: Guide to .htaccess |
emagin wrote: Just a quick note on register_globals=OFF In several hosted environments I have found they run PHP in CGI mode, which means you cannot set any traditional php.ini parameters from .htaccess. It craps out. Yes. I made that point with this: Quote: Now, here is the tricky part. These directives ONLY work on sites that have PHP running under Apache, as an Apache module, not as CGI. PHPSuExec runs under CGI and setting the register_globals in .htaccess will not work. With PHP running under cgi, some hosts allow users to set individual php.ini files, some don't. And, again, what is permitted within those files depends very much on how the host has set the server up. Windows users running Apache on IIS also have the same problem - it all depends on how the server is set up to handle overrides. |
|
| Author: | emagin [ Fri Aug 25, 2006 3:35 pm ] |
| Post subject: | Re: DISCUSSION: Guide to .htaccess |
Sorry, hadn't seen that note in your post there, thanks! Might be useful to put up some scenarios: Apache 1.x Apache 1.x with PHP in CGI mode Apache 2.x Etc. but maybe that just complicates things. I just know that when I first started reading about all this stuff, I spent a couple of hours trying to figure out why I kept getting errors on editing .htaccess, and I had to search around about the CGI mode issues. All the best. |
|
| Author: | ez2ask [ Mon Feb 19, 2007 4:31 am ] |
| Post subject: | Re: DISCUSSION: Guide to .htaccess |
I am totally exhausted with the .htaccess file (Joomla core SEF), I tried everything I could and I read lots of related articles from Joomla Forum site, but NONE of them are worked. I do not know what's wrong with it, I hope someone could help me ASAP if possible. Really appreciate!! ![]() I have already wrote a test .htaccess file (according to JoomProsolution.com's testing .htaccess file), and it works. That means mod_rewrite is enable. I have already asked the hosting company, they said the .htaccess override is enable also. The hosting server environment is Apache 1.3.33 (Unix) and PHP 4.4.4, the PHP register_globals is currently on. The .htaccess file that I tried is following: (Joomla was installed under root directory and domain is like http://www.mydomain.org) ## Can be commented out if causes errors, see notes above. Options +FollowSymLinks #I tried commented, uncommented and also none + sign in frond of FollowSymLinks, none of them worked ![]() # # mod_rewrite in use RewriteEngine On php_flag register_globals off #Joomla suggests to turn it off, I also tried php_value register_globals 0, and does not work either # Uncomment following line if your webserver's URL # is not directly related to physical file paths. # Update Your Joomla/MamboDirectory (just / for root) # RewriteBase / RewriteCond %{HTTP_HOST} ^mydomain.org #with or without these two lines, are all causeed Internal Server Error message ![]() RewriteRule ^(.*)$ http://www.mydomain.org/$1 [R=301,L] ########## Begin - Joomla! core SEF Section ############# Use this section if using ONLY Joomla! core SEF ## ALL (RewriteCond) lines in this section are only required if you actually ## have directories named 'content' or 'component' on your server ## If you do not have directories with these names, comment them out. # RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes## RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC] RewriteRule ^(content/|component/) index.php # ########## End - Joomla! core SEF Section ########## Begin - Rewrite rules to block out some common exploits ## If you experience problems on your site block out the operations listed below ## This attempts to block the most common type of exploit `attempts` to Joomla! # # Block out any script trying to set a mosConfig value through the URL RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR] # Block out any script trying to base64_encode crap to send via URL RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR] # Block out any script that includes a | |