| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
hvactechforum
Joined: 03 Mar 2007 Posts: 44
|
Posted: Sun Mar 04, 2007 6:27 am Post subject: question about mod_rewrite |
|
|
I use phpBB2 and have installed your "dynamic meta tags" and "advanced mod_rewrite" hacks. Both are working great and I am very happy with the immediate results. However, I do have some other questions about modifying the .htaccess file.
Now that I have created and uploaded an .htaccess file whose purpose is to perform the URL rewriting, how do I further optimize this file? Let me explain what I want to achieve......
1. How do I redirect all traffic from "www . mysite . com" to "www . mysite . com / folder" ? (Since my forum is not installed in the root and I want my forum index to be the website's homepage. Also please notice that from the url_rewrite that my "/folder.php" is now "/folder" - is this a concern?)
2. How do I redirect all "non-www" traffic to the "www" path? (since this is also very important for search engine optimization)
3. Are there any other basic .htaccess modifications that would be helpful for a website like mine?
Here is a copy of my .htaccess file as it is now:
| Code: | RewriteEngine On
RewriteBase /
#########################################################
# hvactalkforum SEO REWRITE RULES #
#########################################################
# AUTHOR : DCZ http://www.hvactalkforum-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
# RewriteRule ^hvactalkforum/index\.html$ /hvactalkforum/index.php [QSA,L]
# FORUM PROTECTION RULE
# RewriteRule ^hvactalkforum/.*/([^/]+\.html)$ /hvactalkforum/index.php [R=301,L]
# CATEGORIES
RewriteRule ^hvactalkforum/.*-c([0-9]+)\.html$ /hvactalkforum/index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^hvactalkforum/.*-f([0-9]+)-([0-9]+)\.html$ /hvactalkforum/viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^hvactalkforum/.*-f([0-9]+)\.html$ /hvactalkforum/viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^hvactalkforum/.*-t([0-9]+)-([0-9]+)\.html$ /hvactalkforum/viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^hvactalkforum/.*-t([0-9]+)\.html$ /hvactalkforum/viewtopic.php?t=$1 [QSA,L]
# POST
RewriteRule ^hvactalkforum/post([0-9]+)\.html$ /hvactalkforum/viewtopic.php?p=$1 [QSA,L]
#PROFILES
RewriteRule ^hvactalkforum/member([0-9]+)\.html$ /hvactalkforum/profile.php?mode=viewprofile&u=$1 [QSA,L]
# END hvactalkforum PAGES
#####################################################
|
* I apologize if this question is better suited in the apache mod_rewrite forum, I am posting it here because I believe that it might be prudent to answer these questions in a short paragraph inside the mod instructions itself. If better suited in other forum, please move. *
Thank you for your help. I feel these questions are very important because if users can find the website it doesn't matter how optimized it is.  |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14279
|
Posted: Sun Mar 04, 2007 6:13 pm Post subject: Re: question about mod_rewrite |
|
|
I'm not sure it's the best thing to do to redirect everything from root to the forum folder.
Why installing phpBB in a folder if you don't want to use the root level ?
If you plan to add content at the root level, a simple welcome page, with links to your forum can be a nice thing, since you'll start building PageRank on both root level and forum folder since the very beginning.
You could set up a met refresh for your user to be redirected after a short while to your forum until you build up a real web site at the root level.
About the www prefix, please read this thread.
Besides, your .htaccess is fine.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
hvactechforum
Joined: 03 Mar 2007 Posts: 44
|
Posted: Tue Mar 06, 2007 12:06 am Post subject: Re: question about mod_rewrite |
|
|
| dcz wrote: | I'm not sure it's the best thing to do to redirect everything from root to the forum folder.
Why installing phpBB in a folder if you don't want to use the root level ?
If you plan to add content at the root level, a simple welcome page, with links to your forum can be a nice thing, since you'll start building PageRank on both root level and forum folder since the very beginning.
You could set up a met refresh for your user to be redirected after a short while to your forum until you build up a real web site at the root level.
About the www prefix, please read this thread.
Besides, your .htaccess is fine.
++ |
I guess I didn't realize the importance of having content in the root area. Thanks for the input. I am going to start from scratch with phpBB3 anyway, this time I will put it in the root and eliminate this problem of having to redirect. Thanks!  |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14279
|
Posted: Tue Mar 06, 2007 12:19 am Post subject: Re: question about mod_rewrite |
|
|
It's not a requirement, but still, the root url is the best part of a domain, the one to be considered as the most important by default by SEs.
As well, if you'd redirect all to a folder, you'd end up with longer urls. Adding a keyword in a folder can be useful of course, but not necessarily for all your content, it's cool as well to be able to select all the keywords you'll put in an url.
The domain's root is always a good place for your most important content.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |