Locking the www in urls

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

Moderator: Moderators

Postby ibnuasad » Fri Jul 28, 2006 1:39 pm

What is the difference between the First method and Second Method?

I am currently using the First Method. Which method should I use?
ibnuasad
 
Posts: 4
Joined: Fri Jul 28, 2006 3:26 am
Location: Malaysia...Truly Asia!

Advertisement

Postby dcz » Fri Jul 28, 2006 3:52 pm

Well, the first one is just making sure it is not example.com to be used, where the second one make sure it is www.example.com to be used which leads to the same result.

It only changes something when playing with sub-domains linked to the same web space as the main one.

First method is then faster, as you won't need to test every single sub-domain as if using the other one.

The more important here is it works : -http://networldtalk.net ;)

++
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: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Sun Jul 30, 2006 11:30 am

which method is suitable for me
i can not add www beform my subforum url
see this

-www.forum.persia-cms.com
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby dcz » Sun Jul 30, 2006 12:41 pm

Then don't add it, you can try make sure it's not tested, but I doubt your server settings will allow the www version to hit your sub-domain webspace, so I don't think this will change anything.

Actually, it's the first time I see such page, usually, when the www prefix is not available, it leads to a 404, not to a login page not being really related it seems.

Anyway the worst is avoided as those two are not duplicates ;)


++
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: 21219
Joined: Fri Apr 28, 2006 9:03 pm

please help me

Postby lavinya » Thu Sep 07, 2006 2:57 pm

Hello all.

dcz; I have 3 domain .

example
Code: Select all
www.phpbb-seo.com
www.phpbb-seo1.com
www.phpbb-seo2.com
phpbb-seo.com
phpbb-seo1.com
phpbb-seo2.com


main domain www.phpbb-seo.com
above all domain however redirect to www.phpbb-seo.com ?

and all current links and domains are indexed my search engines, I want to make Redirect 301 from old links to new links ?

eg.
Code: Select all
www.phpbb-seo2.com/phpBB2/about1468.html
redirect to 301 www.phpbb-seo.com/phpBB2/about1468.html

,
---
Code: Select all
phpbb-seo1.com/phpBB2/forum-11.html
redirect to
www.phpbb-seo.com/phpBB2/forum-11.html


please help me :(

if you reply I will be happy. thanks. :(
User avatar
lavinya
PR1
PR1
 
Posts: 167
Joined: Mon Jul 24, 2006 9:05 am
Location: Turkey

Postby dcz » Thu Sep 07, 2006 3:52 pm

So I assume you are happy now :D

Very simple indeed.

You just need to use the !^www\.example\.com method (not the ^example.com), some thing like :
Code: Select all
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^(.*) http://www.example.com/$1 [QSA,L,R=301]


With this any domain linked to the same folder as the one you want in the end, will be HTTP 301 redirected to the correct one.

The idea is any_sub.any_domain.any_ext/*.* will be redirected to www.example.com/*.* ;)
And if you only have one .htaccess with rewriterules in it, this will work for all sub-folders at once.

You may have to play a bit around the suggested code as explained in the first post, but it will work.

++
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: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Postby lavinya » Thu Sep 07, 2006 4:33 pm

very thanks dcz very happy :)


dcz: main directory it will work >> ok
eg: www.xxxx1.com redirect to www.xxxx.com

I have got subdomain .htaccess eg: /phpBB2/ and /gallery/
doesnt will work. :(

-----

I after this code added in /phpBB2/ .htaccess
Code: Select all
RewriteCond %{HTTP_HOST} !^www\.mydomain\.com$ [NC]
RewriteRule ^(.*) http://www.mydomain.com/$1 [QSA,L,R=301]


doesnt work :(

click to http://www.maindomain2.com/phpBB2/about219.html
redirect to
http://www.maindomain.com/viewtopic.php?t=219 >> error 404 page :(

please help me thanks :cry:
User avatar
lavinya
PR1
PR1
 
Posts: 167
Joined: Mon Jul 24, 2006 9:05 am
Location: Turkey

Postby dcz » Thu Sep 07, 2006 5:08 pm

This is becoming more complex if you do not implement all of your rewriterules in your root's .htaccess.

Don't worry, as you can see on this site, it's just very possible to filter www prefix and run sub domains in the same folder.

My problem here to help out is to know :
    1) where are all the .htaccess with rewriterules in it
    2) sub domain config : where are they installed.
    3) possibly real examples, or at lest a link to the concerned web site.


Don't worry about posting duplicate domains links here as we'll http 301 all of them, this is for sure ;)

++
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: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Postby lavinya » Thu Sep 07, 2006 5:39 pm

Thanks dcz. :D

my main site adress :
www.lavinya.net

other my site adress:
www.lavinya.org
www.lavinya.de
lavinya.net
lavinya.org
lavinya.de

click to www.lavinya.org
redirect to >> www.lavinya.net (OK)

Here my root directory .htaccess www.lavinya.net /.htaccess
Code: Select all
AddType application/x-httpd-php .html .htm

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.lavinya\.net$ [NC]
RewriteRule ^(.*) http://www.lavinya.net/$1 [QSA,L,R=301]

ErrorDocument 404 /404.html
ErrorDocument 403 /403.html

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^$
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/.* http://%{REMOTE_ADDR}/ [L,E=nolog:1]



click to http://www.lavinya.org/phpBB2/about219.html
redirect to >> http://www.lavinya.net/viewtopic.php?t=219 (404 page)

Here my www.lavinya.net/phpBB2 /.htaccess code

Code: Select all
RewriteEngine On
RewriteBase /phpBB2/
RewriteRule ^forums.* index.php [L,NC]
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]
RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC]
RewriteRule ^about([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC]
RewriteRule ^about([0-9]*).* viewtopic.php?t=$1 [L,NC]
RewriteRule ^about([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^mark-forum([0-9]*).html* viewforum.php?f=$1&mark=topics [L,NC]
RewriteRule ^updates-topic([0-9]*).html* viewtopic.php?t=$1&watch=topic [L,NC]
RewriteRule ^stop-updates-topic([0-9]*).html* viewtopic.php?t=$1&unwatch=topic [L,NC]
RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L,NC]
RewriteRule ^forum-([0-9]*).* viewforum.php?f=$1 [L,NC]
RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous [L,NC]
RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next [L,NC]
RewriteRule ^ara-([0-9]*)-([0-9]*).html search.php?search_id=$1&start=$2 [L]
RewriteRule ^arama-yazar-([a-zA-Z0-9_-]*).html search.php?&search_author=$1 [L]
RewriteRule ^cevapsiz.html search.php?search_id=$1 [L]
RewriteRule ^yeni-kayit.html profile.php?mode=register&agreed=true [L]
RewriteRule ^kayit-coppa.html profile.php?mode=register&agreed=true&coppa=true [L]
RewriteRule ^kayit.html profile.php?&mode=register [L]
RewriteRule ^bilgiduzenle.html profile.php?mode=editprofile [L]
RewriteRule ^uye-([0-9]*).html profile.php?mode=viewprofile&u=$1 [L]
RewriteRule ^kayipsifre.html profile.php?mode=sendpassword [L]
RewriteRule ^kategori-([0-9]*).html index.php\?c=$1 [L]
RewriteRule ^uyelistesi-([a-zA-Z0-9]*)-([a-zA-Z]*)-([0-9]*).html memberlist.php\?mode=$1&order=$2&start=$3 [L]
RewriteRule ^uyelistesi.html memberlist.php [L]
RewriteRule ^sss-([a-zA-Z0-9]*).html faq.php\?mode=$1 [L]
RewriteRule ^sss.html faq.php [L]
RewriteRule ^sitemaps.xml$ sitemap.php [L]
RewriteRule ^sitemap-forum-([0-9]+).xml$ sitemap.php?fid=$1 [L]
RewriteRule ^sitemap-forum.xml$ sitemap.php?forum [L]

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.lavinya\.net$ [NC]
RewriteRule ^(.*) http://www.lavinya.net$1 [QSA,L,R=301]


:?

Now delete below code but no redirect adress
click to >> http://www.lavinya.org/phpBB2/about219.html
no redirect...
Code: Select all
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.lavinya\.net$ [NC]
RewriteRule ^(.*) http://www.lavinya.net/$1 [QSA,L,R=301]
User avatar
lavinya
PR1
PR1
 
Posts: 167
Joined: Mon Jul 24, 2006 9:05 am
Location: Turkey

Postby dcz » Thu Sep 07, 2006 6:01 pm

Jeez, I had never paid too much attention to the able2know rewriterules, but it seems some are useless. It's a bit of topic but :
Code: Select all
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]


Should just be :
Code: Select all
RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [QSA,L,NC]


or even better :
Code: Select all
RewriteRule ^post-([0-9]*)\.html viewtopic.php?p=$1 [QSA,L,NC]


$highlight being here a $_GET var, it will be passed to the script with the QSA flag.

It's just more work for Apache for nothing.

So I think the only thing you need to do for the redirection to work across domains, is to delete your phpBB/ .htaccess and to add all the rewriterules that where in it in the root's one.
You'd need to add proper paths, so it would look like :

Code: Select all
AddType application/x-httpd-php .html .htm

ErrorDocument 404 /404.html
ErrorDocument 403 /403.html

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_REFERER} ^$
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/.* http://%{REMOTE_ADDR}/ [L,E=nolog:1]

RewriteCond %{HTTP_HOST} !^www\.lavinya\.net$ [NC]
RewriteRule ^(.*) http://www.lavinya.net/$1 [QSA,L,R=301]

RewriteRule ^phpBB2/forums.* phpBB2/index.php [L,NC]
RewriteRule ^phpBB2/post-([0-9]*).html&highlight=([a-zA-Z0-9]*) phpBB2/viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^phpBB2/post-([0-9]*).* phpBB2/viewtopic.php?p=$1 [L,NC]
RewriteRule ^phpBB2/view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* phpBB2/viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
RewriteRule ^phpBB2/about([0-9]*).html&highlight=([a-zA-Z0-9]*) vviewtopic.php?t=$1&highlight=$2 [L,NC]
RewriteRule ^phpBB2/about([0-9]*).html&view=newest phpBB2/viewtopic.php?t=$1&view=newest [L,NC]
RewriteRule ^phpBB2/about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* phpBB2/viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
RewriteRule ^phpBB2/about([0-9]*)-([0-9]*).* phpBB2/viewtopic.php?t=$1&start=$2 [L,NC]
RewriteRule ^phpBB2/about([0-9]*).* phpBB2/viewtopic.php?t=$1 [L,NC]
RewriteRule ^phpBB2/about([0-9]*).html phpBB2/viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^phpBB2/mark-forum([0-9]*).html* phpBB2/viewforum.php?f=$1&mark=topics [L,NC]
RewriteRule ^phpBB2/updates-topic([0-9]*).html* phpBB2/viewtopic.php?t=$1&watch=topic [L,NC]
RewriteRule ^phpBB2/phpBB2/stop-updates-topic([0-9]*).html* phpBB2/viewtopic.php?t=$1&unwatch=topic [L,NC]
RewriteRule ^phpBB2/forum-([0-9]*).html phpBB2/viewforum.php?f=$1 [L,NC]
RewriteRule ^phpBB2/forum-([0-9]*).* phpBB2/viewforum.php?f=$1 [L,NC]
RewriteRule ^phpBB2/topic-([0-9]*)-([0-9]*)-([0-9]*).* phpBB2/viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
RewriteRule ^phpBB2/ptopic([0-9]*).* phpBB2/viewtopic.php?t=$1&view=previous [L,NC]
RewriteRule ^phpBB2/ntopic([0-9]*).* phpBB2/viewtopic.php?t=$1&view=next [L,NC]
RewriteRule ^phpBB2/ara-([0-9]*)-([0-9]*).html phpBB2/search.php?search_id=$1&start=$2 [L]
RewriteRule ^phpBB2/arama-yazar-([a-zA-Z0-9_-]*).html phpBB2/search.php?&search_author=$1 [L]
RewriteRule ^phpBB2/cevapsiz.html phpBB2/search.php?search_id=$1 [L]
RewriteRule ^phpBB2/yeni-kayit.html phpBB2/profile.php?mode=register&agreed=true [L]
RewriteRule ^phpBB2/kayit-coppa.html phpBB2/profile.php?mode=register&agreed=true&coppa=true [L]
RewriteRule ^phpBB2/kayit.html phpBB2/profile.php?&mode=register [L]
RewriteRule ^phpBB2/bilgiduzenle.html phpBB2/profile.php?mode=editprofile [L]
RewriteRule ^phpBB2/uye-([0-9]*).html phpBB2/profile.php?mode=viewprofile&u=$1 [L]
RewriteRule ^phpBB2/kayipsifre.html phpBB2/profile.php?mode=sendpassword [L]
RewriteRule ^phpBB2/kategori-([0-9]*).html phpBB2/index.php\?c=$1 [L]
RewriteRule ^phpBB2/uyelistesi-([a-zA-Z0-9]*)-([a-zA-Z]*)-([0-9]*).html phpBB2/memberlist.php\?mode=$1&order=$2&start=$3 [L]
RewriteRule ^phpBB2/uyelistesi.html vmemberlist.php [L]
RewriteRule ^phpBB2/sss-([a-zA-Z0-9]*).html phpBB2/faq.php\?mode=$1 [L]
RewriteRule ^phpBB2/sss.html phpBB2/faq.php [L]
RewriteRule ^phpBB2/sitemaps.xml$ phpBB2/sitemap.php [L]
RewriteRule ^phpBB2/sitemap-forum-([0-9]+).xml$ phpBB2/sitemap.php?fid=$1 [L]
RewriteRule ^phpBB2/sitemap-forum.xml$ phpBB2/sitemap.php?forum [L]


This way you are sure the redirection will work for all sub folders, as long as they do not turn the rewrite engine on themselves.
It's no big deal to read a bigger .htaccess from root, the process is lite fast.
The other scenario, in which you'd repeat the redirection in every .htaccess should work, but you need to then replace :

Code: Select all
RewriteEngine On
RewriteBase /phpBB2/


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


in your original phpBB2/ .htaccess.

++
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: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Postby lavinya » Thu Sep 07, 2006 6:34 pm

thanks dcz.

Added above code but

Code: Select all
Internal Server Error
:oops:
User avatar
lavinya
PR1
PR1
 
Posts: 167
Joined: Mon Jul 24, 2006 9:05 am
Location: Turkey

Postby dcz » Thu Sep 07, 2006 11:03 pm

Erf, I think it's the wrapping function that added a space somewhere in the code, please quot my message and grab the code from there, this wrapper needs to be fixed !
Anyway, it's just putting thing in the correct order (only one time rewrite engine on, and adding phpBB2/ in the paths).

Have you tried solution number 2 ?
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: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Postby lavinya » Fri Sep 08, 2006 7:14 am

big thanks dcz. my problem solved. :)

delete www.lavinya.net/phpBB2/ .htaccess

new create www.lavinya.net/ .htaccess
Code: Select all
AddType application/x-httpd-php .html .htm

ErrorDocument 404 /404.html
ErrorDocument 403 /403.html

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.lavinya\.net$ [NC]
RewriteRule ^(.*) http://www.lavinya.net/$1 [QSA,L,R=301]

RewriteEngine On
RewriteRule ^phpBB2/forums.* phpBB2/index.php [L,NC]
RewriteRule ^phpBB2/post-([0-9]*).html&highlight=([a-zA-Z0-9]*) phpBB2/viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^phpBB2/post-([0-9]*).* phpBB2/viewtopic.php?p=$1 [L,NC]
RewriteRule ^phpBB2/view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* phpBB2/viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
RewriteRule ^phpBB2/about([0-9]*).html&highlight=([a-zA-Z0-9]*) phpBB2/viewtopic.php?t=$1&highlight=$2 [L,NC]
RewriteRule ^phpBB2/about([0-9]*).html&view=newest phpBB2/viewtopic.php?t=$1&view=newest [L,NC]
RewriteRule ^phpBB2/about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* phpBB2/viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
RewriteRule ^phpBB2/about([0-9]*)-([0-9]*).* phpBB2/viewtopic.php?t=$1&start=$2 [L,NC]
RewriteRule ^phpBB2/about([0-9]*).* phpBB2/viewtopic.php?t=$1 [L,NC]
RewriteRule ^phpBB2/about([0-9]*).html phpBB2/viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^phpBB2/mark-forum([0-9]*).html* phpBB2/viewforum.php?f=$1&mark=topics [L,NC]
RewriteRule ^phpBB2/updates-topic([0-9]*).html* phpBB2/viewtopic.php?t=$1&watch=topic [L,NC]
RewriteRule ^phpBB2/stop-updates-topic([0-9]*).html* phpBB2/viewtopic.php?t=$1&unwatch=topic [L,NC]
RewriteRule ^phpBB2/forum-([0-9]*).html phpBB2/viewforum.php?f=$1 [L,NC]
RewriteRule ^phpBB2/forum-([0-9]*).* phpBB2/viewforum.php?f=$1 [L,NC]
RewriteRule ^phpBB2/topic-([0-9]*)-([0-9]*)-([0-9]*).* phpBB2/viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
RewriteRule ^phpBB2/ptopic([0-9]*).* phpBB2/viewtopic.php?t=$1&view=previous [L,NC]
RewriteRule ^phpBB2/ntopic([0-9]*).* phpBB2/viewtopic.php?t=$1&view=next [L,NC]
RewriteRule ^phpBB2/ara-([0-9]*)-([0-9]*).html phpBB2/search.php?search_id=$1&start=$2 [L]
RewriteRule ^phpBB2/arama-yazar-([a-zA-Z0-9_-]*).html phpBB2/search.php?&search_author=$1 [L]
RewriteRule ^phpBB2/cevapsiz.html phpBB2/search.php?search_id=$1 [L]
RewriteRule ^phpBB2/yeni-kayit.html phpBB2/profile.php?mode=register&agreed=true [L]
RewriteRule ^phpBB2/kayit-coppa.html phpBB2/profile.php?mode=register&agreed=true&coppa=true [L]
RewriteRule ^phpBB2/kayit.html phpBB2/profile.php?&mode=register [L]
RewriteRule ^phpBB2/bilgiduzenle.html phpBB2/profile.php?mode=editprofile [L]
RewriteRule ^phpBB2/uye-([0-9]*).html phpBB2/profile.php?mode=viewprofile&u=$1 [L]
RewriteRule ^phpBB2/kayipsifre.html phpBB2/profile.php?mode=sendpassword [L]
RewriteRule ^phpBB2/kategori-([0-9]*).html phpBB2/index.php\?c=$1 [L]
RewriteRule ^phpBB2/uyelistesi-([a-zA-Z0-9]*)-([a-zA-Z]*)-([0-9]*).html phpBB2/memberlist.php\?mode=$1&order=$2&start=$3 [L]
RewriteRule ^phpBB2/uyelistesi.html phpBB2/memberlist.php [L]
RewriteRule ^phpBB2/sss-([a-zA-Z0-9]*).html phpBB2/faq.php\?mode=$1 [L]
RewriteRule ^phpBB2/sss.html phpBB2/faq.php [L]
RewriteRule ^phpBB2/sitemaps.xml$ phpBB2/sitemap.php [L]
RewriteRule ^phpBB2/sitemap-forum-([0-9]+).xml$ phpBB2/sitemap.php?fid=$1 [L]
RewriteRule ^phpBB2/sitemap-forum.xml$ phpBB2/sitemap.php?forum [L]


re thanks dcz. my footer add thanks to dcz in /phpBB2/ :D

dcz
this code
Code: Select all
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]


replace with to


Code: Select all
RewriteRule ^post-([0-9]*)\.html viewtopic.php?p=$1 [QSA,L,NC]


correct ???
and QSA flag what mean ?
User avatar
lavinya
PR1
PR1
 
Posts: 167
Joined: Mon Jul 24, 2006 9:05 am
Location: Turkey

Postby AmirAbbas » Fri Sep 08, 2006 7:29 am

hello

my domain is on new server
both

http://persia-cms.com
and
http://www.persia-cms.com

works for my domain
how can i lock www in my first domain and all subdomain
i have subdomain in this address

http://forum.persia-cms.com

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

Postby dcz » Fri Sep 08, 2006 7:30 am

lavinya wrote:
re thanks dcz. my footer add thanks to dcz in /phpBB2/ :D

dcz
this code
Code: Select all
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]


replace with to


Code: Select all
RewriteRule ^post-([0-9]*)\.html viewtopic.php?p=$1 [QSA,L,NC]


correct ???
and QSA flag what mean ?


Cool :D

QSA stands for Query String Append, it's just an option to make sure additional $_GET vars that could be in the requested URI will be passed to the script.

So there is no need to add vars like $highlight in the left part of the rewriterules.
You can implement the change, don't forget the paths though ;)

There would be some more small optimizations doable in your .htaccess, we can look at it in the Apache mod rewrite forum if you like.

++
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: 21219
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 2 guests