| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read | ![]() |
|
||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
Sometimes*, when I enter my domain name on the address bar of the browser e.g www mydomain com (no . cause I am not allowed to post urls yet), it transforms to mydomain com (the www gets removed). This seams to cause some problems with authentication in Joomla. Is there a configuration tweak to avoid it? Even better, I would like to automatically add www to the domain names when it is not entered by the user. I have a whm/cpanel vps account. Alex *Edit: It happens when I don't place a / at the end of the address for a directory other than root eg www mydomain com /administrator transforms to mydomain com /administrator when www mydomain com /administrator/ doesn't. Last edited by alexvts; 05-29-2008 at 09:08 AM. |
|
|||
|
Found it!
Because the problem occurs when the trailing slash is missing, adding the following to .htaccess solves it RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*)$ h t t p://www mydomain gr/$1/ [L,R=301] (again no . because I am not allowed to post url yet) Search for "add trailing slash" to find more on the web Alex |
|
|||
|
Well I was going to say it sounds like you have a rewrite on, but yes you found it. That would play havoc with your joomla cookies, so make sure also your cookies in joomla can handle www and no www.
I think you do that by placing a . before the domain name like so .domain
__________________
Midlands Weather Forum |
|
|||
|
np!
Quote:
Alex |
|
|||
|
No no, you've dealt with it now, leave it unless you have an issue. My rewrite on comment verified your htaccess issue RewriteEngine On
__________________
Midlands Weather Forum |
|
||||
|
__________________
Webhosting.UK.com || cPanel VPS Hosting || Reseller Hosting || Support System || Billing System Sales: 0808-262-0855 Support: 0800-612-8725 International: +44 191 303 8191 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|