Google, and URL redirects

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
davidsuk
Posts: 8
Joined: Sun 12. Sep 2004, 23:05

Google, and URL redirects

Post by davidsuk »

Hello folks, a couple of questions about Google and PHPWCMS:

PHPWCMS is installed at: http://www.treatthepeople.com/phpwmcs/ so my start page is http://www.treatthepeople.com/phpwmcs/index.php . Obviously, when I give people the address for my site, I don't give them that, I just give them "www.treatthepeople.com" then I have an index.html file in the root that reads:
:<HTML LANG=en-CA>
<HEAD>
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.treatthepeople.com/phpwmcs/index.php">
<META NAME="ROBOTS" CONTENT="NOINDEX, FOLLOW">
</head>
</html>
Google ranks pages by how many links around the WWW link to your page (and how highly ranked those pages are). Most links on the web are to treatthepeople.com, not to treatthepeople.com/phpwmcs/index.php. So what will happen? will the page stay ranked low even if many pages link to the treatthepeople.com address? Or will google count links to treatthepeople.com as links to /phpwmcs/index.php?

Furthermore, within that site, there are a number of "chapter site" - that is, pages for local chapters of the organization. Each of these chapters has a website something like http://www.treatthepeople.com/phpwmcs/index.php?mgac . but is given a simple address too - http://www.treatthepeople.com/mgac (in the mgac folder there is a index.html file that links to the real address) So same question here: if there are links around the net linking to http://www.treatthepeople.com/mgac , will that improve the mgac page google ranking?

Are there alternative ways organize a site ensuring high rankings, and accessibility in the form of an easy URL?

thanks, David
spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli »

I am having the exact same issue and would also like to hear answers to the questions above. I also give people or other websites links like http://www.domain.com/category that redirect to http://www.domain.com/category.phtml
Povijest
Posts: 6
Joined: Wed 1. Dec 2004, 00:16
Location: Meðimurje, Kroatien
Contact:

Re: Google, and URL redirects

Post by Povijest »

davidsuk wrote: PHPWCMS is installed at: http://www.treatthepeople.com/phpwmcs/ so my start page
.. cut ..

How do you get that shadow around your page???
fnord
Posts: 17
Joined: Sat 20. Nov 2004, 06:39

htaccess redirect

Post by fnord »

spirelli wrote:I am having the exact same issue and would also like to hear answers to the questions above. I also give people or other websites links like http://www.domain.com/category that redirect to http://www.domain.com/category.phtml
I think you should be able to accomplish exactly what you want with an .htaccess redirect.

1. Grab your .htaccess file from the place the www docs are stored on your server (or create a blank text file if one doesn't exist.)

2. Add a line like this:

Code: Select all

redirect 301 /category http://www.mydomain.com/category.phtml
3. Put the .htaccess file back on the server.

You should find that if a user types in the "http://www.mydomain.com/category" it takes them right to the phtml file. Search engines are supposed to respect this redirect as a "permanently moved file" so they should show the category.phtml next time they re-index your site.

I'm handling a large redesign of a site where many files have moved in this way. So far, so good on my testing but I have to wait for all the search engines to update to be sure. I'll keep you posted if I come across any big problems but so far this is MUCH cleaner and faster than using html forwards everywhere.

Enjoy-

Fnord
Igor
Posts: 97
Joined: Fri 30. Apr 2004, 16:30
Location: The Netherlands
Contact:

Post by Igor »

This redirect instruction in the .htaccess file doesn't work on my site. :( I use http://www.paffen.nl/verzekeringen where http://www.paffen.nl/verzekeringen.phtml is an existing category.

What is wrong?
Igor
fnord
Posts: 17
Joined: Sat 20. Nov 2004, 06:39

Post by fnord »

Igor wrote:This redirect instruction in the .htaccess file doesn't work on my site. :( I use http://www.paffen.nl/verzekeringen where http://www.paffen.nl/verzekeringen.phtml is an existing category.

What is wrong?
Try adding a "/" after the "directory" entry like this:

Code: Select all

redirect 301 /testing45/ http://www.mysite.org/file.phtml
That should do the trick. I just tested it and it works for me.

Fnord
Igor
Posts: 97
Joined: Fri 30. Apr 2004, 16:30
Location: The Netherlands
Contact:

Post by Igor »

Didn't help... :(
Igor
fnord
Posts: 17
Joined: Sat 20. Nov 2004, 06:39

Post by fnord »

Odd...it should work. Can you post your entire .htaccess file? Are other commands in your .htaccess file working properly? Do you have your .htaccess file in the "root" web directory?
Igor
Posts: 97
Joined: Fri 30. Apr 2004, 16:30
Location: The Netherlands
Contact:

Post by Igor »

OK, here it is. It's the standard file, with only some little changes. The rewrite works good.

Code: Select all

# These settings are recommend
# Maybe you might have problems
# with other scripts that needs
# register_globals ON
php_flag magic_quotes_gpc Off
php_flag register_globals Off


# Rewrite functionality for phpwcms
# optimized by Jan212
# 18-04-2004

# Check that you have set Options FollowSymLinks
# and right Allow
RewriteEngine On

# maybe you need this
DirectoryIndex index.html index.php 


# Default ReWrite settings for phpwcms
# ===============================================
# This will rewrite 0.0.0.0.0.0.phtml => index.php?id=0.0.0.0.0.0
RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.phtml$ index.php?id=$1.$2.$3.$4.$5.$6

# This will rewrite mypage.phtml => index.php?mypage
RewriteRule ^(.+)\.phtml$ index.php?$1


# If phpwcms is installed in a subdirectory,
# sample: "mysubdir" then use this (remove #)
# if above lines doesn't work for you
# ===============================================
#RewriteBase /mysubdir
#RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.phtml$ /mysubdir/index.php?id=$1.$2.$3.$4.$5.$6
#RewriteRule ^(.+)\.phtml$ /mysubdir/index.php?$1 


# If you want to set rewrite logging
# ===============================================
#RewriteLog "/absolute/path/to/the/rewrite.log" 
# 0 = Logging disabled, 9 = highest level of logging, only for debugging 
#RewriteLogLevel 3

redirect 301 /verzekeringen/ http://www.paffen.nl/verzekeringen.phtml
By the way. On my other phpwcms site (other provider) I can use URL's like http://www.mysite.com/?category to go to the mentioned category page. The redirect line you suggested isn't added in the .htaccess file. When I add it, your method doesn't work. The ?-method still works.

Strange...
Igor
Post Reply