Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
htaccess doubt - redirect from non-www to www site. Is this correct?
aery
✭✭✭
I would like to redirect non-www prefix pages to www prefix pages.
However, I have to do this in vanilla forum which already has few redirect rules in htaccess.
I have added the redirect code above it. I would like to know whether this is correct? It is working fine but I feel performance problem as the forum is loading really slow.
Can anyone help me telling this is not standard or the better way of doing it.
PS: The forum is not at the root but in folder named 'forum'. At root there is already wordpress blog.
However, I have to do this in vanilla forum which already has few redirect rules in htaccess.
I have added the redirect code above it. I would like to know whether this is correct? It is working fine but I feel performance problem as the forum is loading really slow.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /forum
RewriteCond %{HTTP_HOST} ^gtricks.com [NC]
RewriteRule ^(.*)$ http://www.gtricks.com/forum/$1 [L,R=301]
# Certain hosts may require the following line.
# If vanilla is in a subfolder then you need to specify it after the /.
# (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
# RewriteBase /forum
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
Can anyone help me telling this is not standard or the better way of doing it.
PS: The forum is not at the root but in folder named 'forum'. At root there is already wordpress blog.
There was an error rendering this rich post.
0
Comments
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.com
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=permanent,L]
There was an error rendering this rich post.