Locking the www in urls

Discussions about SEO Techniques implemented in your sites. Tests, Studies and results analysis.

Moderator: Moderators

Postby falkra » Sun Apr 15, 2007 6:38 pm

The code is ok, but you have to add the slash char after .com when typing your urls.

This works well, and rewrites :
bigskyfans.com/gallery
User avatar
falkra
PR3
PR3
 
Posts: 373
Joined: Sun Mar 11, 2007 12:11 am

Advertisement

Postby noworyz » Sun Apr 15, 2007 6:44 pm

ahh, cool. Thanks. I guess I was testing by going to the actual url first, then deleting the www

It seems that the / after gallery is what is breaking it.

so.

bigskyfans.com/gallery works fine but bigskyfans.com/gallery/ doesn't work
noworyz
PR0
PR0
 
Posts: 97
Joined: Mon Jan 08, 2007 10:36 pm

Postby falkra » Mon Apr 16, 2007 6:25 am

Well, w<hen y type -http://bigskyfans.com/gallery/, i am redirected to -http://www.bigskyfans.com/gallery/ automatically, your method is fine, removing the "www." on "real" urls so to speak.
User avatar
falkra
PR3
PR3
 
Posts: 373
Joined: Sun Mar 11, 2007 12:11 am

Postby noworyz » Mon Apr 16, 2007 6:29 am

it works for me now too. Must have been a cache issue with my browser.
noworyz
PR0
PR0
 
Posts: 97
Joined: Mon Jan 08, 2007 10:36 pm

Postby TheBiaatch » Mon Apr 30, 2007 12:01 pm

Thanks alot for this , it worked like a charm ;)
TheBiaatch
 
Posts: 1
Joined: Mon Apr 30, 2007 11:18 am

PHPBB3 www problem

Postby mattwa » Tue Jun 05, 2007 9:09 pm

Hi. Running PHPBB3 in a subfolder with advanced rewrite and zero dupe - neither of which seems to be the problem:) I redirected everything to www using

Code: Select all
RewriteCond %{HTTP_HOST} ^thenewsboards\.com$ [NC]
RewriteRule ^(.*) http://www.thenewsboards.com/$1 [QSA,L,R=301]


which worked fine with PHPBB2 on the same server. Now, everything works fine except for logging in. Whenever I try to log in, it redirects me back to the login page without logging me in. Same if I have it send me a new password or register a new username, just redirects me back to the same page. Removing those 2 lines fixes that problem (but I lose my redirect) so I don't think the SEO tools are the issue.

Any ideas?

Thanks
mattwa
 
Posts: 5
Joined: Sat May 19, 2007 1:50 pm

Postby dcz » Wed Jun 06, 2007 6:12 pm

It could just be because your phpBB config uses "thenewsboards.com" as domain name where it should be "www.thenewsboards.com", in the server settings.

As well, make sure you set your cookie domain to ".thenewsboards.com" (noticed the dot (".")), to allow sessions to be shared other the sub domains (www.thenewsboards.com being a genuine subdomain of thenewsboards.com).

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21382
Joined: Fri Apr 28, 2006 9:03 pm

Postby treatmekindly » Sun Aug 05, 2007 3:40 am

I added the code as suggested in method one then my whole .htaccess file looks like this:

Code: Select all
# You could need to un-comment the following line
# Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*) http://www.example.com/$1 [QSA,L,R=301]

RewriteBase /

#########################################################
# PHPBB SEO REWRITE RULES            #
#########################################################
# AUTHOR : DCZ http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
# RewriteRule ^forums/index\.html$ /forums/index.php [QSA,L,NC]
# FORUM PROTECTION RULE
# RewriteRule ^forums/[a-z0-9_-]+/([^/]+\.html)$ /forums/index.php [R=301,L,NC]
# CATEGORIES
RewriteRule ^forums/[a-z0-9_-]*-c([0-9]+)\.html$ /forums/index.php?c=$1 [QSA,L,NC]
# PAGINATED FORUM
RewriteRule ^forums/[a-z0-9_-]*-f([0-9]+)-([0-9]+)\.html$ /forums/viewforum.php?f=$1&start=$2 [QSA,L,NC]
# FORUM
RewriteRule ^forums/[a-z0-9_-]*-f([0-9]+)\.html$ /forums/viewforum.php?f=$1 [QSA,L,NC]
# PAGINATED TOPIC
RewriteRule ^forums/topic([0-9]+)-([0-9]+)\.html$ /forums/viewtopic.php?t=$1&start=$2 [QSA,L,NC]
# TOPIC
RewriteRule ^forums/topic([0-9]+)\.html$ /forums/viewtopic.php?t=$1 [QSA,L,NC]
# POST
RewriteRule ^forums/post([0-9]+)\.html$ /forums/viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^forums/member([0-9]+)\.html$ /forums/profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
# END PHPBB PAGES
#####################################################


I then uploaded the .htaccess file to my domain treatwidevision.us (root). Is that all I have to do? Can you please check my forums at www.treatwidevision.us/forums to see if things work correctly and if I missed anything? Thanks.

Please do not quote my message when you reply.
treatmekindly
 
Posts: 15
Joined: Sat Jul 14, 2007 12:47 am

Postby AmirAbbas » Mon Aug 06, 2007 8:28 am

hi treatmekindly

i checked your forum
your htaccess rules for locking www doesn't work because:

Code: Select all
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*) http://www.example.com/$1 [QSA,L,R=301]


you musr replace the word "example" with your domain and you must use .us instead of .com
you must use this code

Code: Select all
RewriteCond %{HTTP_HOST} ^treatwidevision\.us$ [NC]
RewriteRule ^(.*) http://www.treatwidevision.us/$1 [QSA,L,R=301]


:wink:
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby treatmekindly » Mon Aug 06, 2007 11:01 am

Thanks. I fixed it. Can you please check it again? Does it work now?
I wonder if I understand this mod correctly. If I enter treatwidevision.us in the Internet Explorer browser or Firefox or Netscape, the URL that appears in the browser's Address box is -http://www.treatwidevision.us which is the same as when I enter -www.treatwidevision.us or http://treatwidevision.us in the browser's Address box, correct?
treatmekindly
 
Posts: 15
Joined: Sat Jul 14, 2007 12:47 am

Postby AmirAbbas » Mon Aug 06, 2007 11:22 am

now its working :P
when your address doesn't have "www" the rewrite rules will redirect that address to proper page that contain "www"

for example:

-http://treatwidevision.us/forums/images-f24.html

will redirect to

-http://www.treatwidevision.us/forums/images-f24.html
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby hosseintdk775 » Sat Jan 19, 2008 2:46 pm

In the name of the god.
hi,
Now we can use redirects in cpanel for this (it is easy :D ).
hosseintdk775
 
Posts: 6
Joined: Thu Jun 28, 2007 9:09 am

Postby kaqpa » Sat Apr 12, 2008 7:28 am

hi my brothers my site seo problem is this

i want login administrator panel and other login but link problem here

Code: Select all
http://www.domain.netadm/index.php?sid=61b886ad3b2cde4c37f51cf7b94a2cc5


true

Code: Select all
http://www.domain.net/forum/adm/index.php?sid=61b886ad3b2cde4c37f51cf7b94a2cc5


my htaccess codes

Code: Select all
Options +FollowSymlinks
RewriteEngine On
RewriteBase /forum/
RewriteCond %{HTTP_HOST} !^www\domain\.net$ [NC]
RewriteRule ^(.*) http://www.domain.net$1 [QSA,L,R=301]


please help :(
kaqpa
 
Posts: 2
Joined: Sat Apr 12, 2008 7:20 am

Postby kaqpa » Sat Apr 12, 2008 8:01 am

i'm problem to solve my htaccess change this codes

Code: Select all
Options +FollowSymlinks
RewriteEngine On
RewriteBase /forum/
RewriteCond %{HTTP_HOST} !^www\.domain\.net$ [NC]
RewriteRule ^(.*) http://www.domain.net/forum/$1 [QSA,L,R=301]


but this problem different now. i want login is administrator panel but problem is here;

Code: Select all
Fatal error: Call to undefined function get_formatted_filesize() in /home/adobetur/public_html/forum/includes/acp/acp_main.php on line 313
kaqpa
 
Posts: 2
Joined: Sat Apr 12, 2008 7:20 am

Postby dcz » Wed Apr 16, 2008 11:25 am

Looks like phpBB specific, is your forum up to date (all files ?)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21382
Joined: Fri Apr 28, 2006 9:03 pm

PreviousNext

Return to SEO Techniques

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 5 guests