[SOLVED] Removing www by using .htaccess causes problems

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Removing www by using .htaccess causes problems

Post by Rolf »

opawaldburger wrote: @Rolf: Perfect! That's exactly how it should work! What did you do or not do?
Ahum read the above (uch, the page before ;)), nothing more, nothing less  ;D   (Guestbook 1.1.12 btw)

Did you leave all the changes, or did you set it back again? It is a combination of...

®
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
opawaldburger
Forum Members
Forum Members
Posts: 94
Joined: Tue Nov 04, 2008 2:10 pm

Re: Removing www by using .htaccess causes problems

Post by opawaldburger »

Could you actually post you (relevant) commands in the .htaccess file? I set back some things and left some... a combination ;)
And in the config.php: how did you set the URL? with www. or without?

thanks again for your help! that's very nice! :)
- Sir, we are sourrounded!
- Excellent, now we can attack in any direction!
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Removing www by using .htaccess causes problems

Post by Rolf »

Code: Select all

# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"

#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

# (this is important, so uncomment if your host permit)
Options -Indexes
ServerSignature Off
#
#Options +FollowSymLinks
#
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /
#
# Link to http://www.website.com then redirect to http://website.com
RewriteCond %{HTTP_HOST} ^www\.atmytestsite\.com [NC]
RewriteRule ^(.*)$ http://atmytestsite.com/$1 [L,R=301]
#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
#
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>

Code: Select all

$config['root_url'] = 'http://atmytestsite.com';
®
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
opawaldburger
Forum Members
Forum Members
Posts: 94
Joined: Tue Nov 04, 2008 2:10 pm

Re: Removing www by using .htaccess causes problems

Post by opawaldburger »

It's like magic - there are the same problems we had before! I copied your .htaccess and replaced atmytestsite whth benjamin-karl. Same with the config.php

It would be SO interessting where the mistake is. Why does it work woth your site...? It's a miracle ;)

greez
- Sir, we are sourrounded!
- Excellent, now we can attack in any direction!
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Removing www by using .htaccess causes problems

Post by Rolf »

opawaldburger wrote: It would be SO interessting where the mistake is. Why does it work woth your site...? It's a miracle ;)
It works for me... Perhaps you have to do a CRTL F5 to refresh your browser...

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
opawaldburger
Forum Members
Forum Members
Posts: 94
Joined: Tue Nov 04, 2008 2:10 pm

Re: Removing www by using .htaccess causes problems

Post by opawaldburger »

tried it in a different browser - stays the same!
- Sir, we are sourrounded!
- Excellent, now we can attack in any direction!
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Removing www by using .htaccess causes problems

Post by Rolf »

Hmm, it works for me...  :-\
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
opawaldburger
Forum Members
Forum Members
Posts: 94
Joined: Tue Nov 04, 2008 2:10 pm

Re: Removing www by using .htaccess causes problems

Post by opawaldburger »

oh sorry, I didn't tell you :S
I set back the .htaccess file so that everyone can access the guestbook.

I also noticed something different. When I add the neccessary lines in the .htaccess file to remove the www, the link for the add-entry-button still is shown with www. On your site, the link is shown without www. Added 2 screenshots!
Attachments
2.jpg
1.jpg
- Sir, we are sourrounded!
- Excellent, now we can attack in any direction!
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Removing www by using .htaccess causes problems

Post by Rolf »

opawaldburger wrote: I also noticed something different. When I add the neccessary lines in the .htaccess file to remove the www, the link for the add-entry-button still is shown with www. On your site, the link is shown without www. Added 2 screenshots!
That is what Dr. CSS said the setting in the config.php root_url.

Please change all the settings discussed before and try to test if it works.
Put a copy of this used .htaccess and the config.php (without the passwords etc.) in here. Perhaps we can give you a pointer in the right direction...

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
opawaldburger
Forum Members
Forum Members
Posts: 94
Joined: Tue Nov 04, 2008 2:10 pm

Re: Removing www by using .htaccess causes problems

Post by opawaldburger »

Hi Guys!

After owr_bgld sent me a PM, which contained that I should check if the modified config.php was REALLY uploaded, I found out the problem - it wasn't. Somehow I wasn't allowed to rewrite the current one, so I first had to delete it and the uploaded it again!

Thanks a lot to all who helped me with this problem!

Greez,
Opa
- Sir, we are sourrounded!
- Excellent, now we can attack in any direction!
Locked

Return to “[locked] Installation, Setup and Upgrade”