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: Select all
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.

English |
French
