Modification of htaccess
I have just upgraded to Vanilla 2.3.1 and all seems okay.
However, how can I modify .htaccess file to display only www.myforumsite.com instead of showing both myforumsite.com and www.myforumsite.com.
Find the original .htaccess file code below.
`# Original
If you modify this file then change the above line to: # Modified
RewriteEngine On
# 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 /
RewriteCond %{QUERY_STRING} ^p=/?([^&]+)(&([^?]+))?$
RewriteRule ^index\.php %1?%3 [E=X_REWRITE:1,L]
# The basic rewrite rule.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,E=X_REWRITE:1,E=X_PATH_INFO:/$1,L]
# Add the proper X_REWRITE server variable for rewritten requests.
RewriteCond %{ENV:REDIRECT_X_REWRITE} .+
RewriteCond %{ENV:REDIRECT_X_PATH_INFO} (.+)
RewriteRule ^index\.php - [QSA,E=X_REWRITE:1,E=!REDIRECT_X_REWRITE,E=X_PATH_INFO:%1,E=!REDIRECT_X_PATH_INFO,L]
# 301 redirect urls that start with index.php
#RewriteCond %{REQUEST_METHOD} GET [NC]
#RewriteCond %{REQUEST_URI} ^(.*?)/index\.php(.*)$
#RewriteRule ^index\.php /%1%2 [QSA,R,L]
Header set Cache-Control "max-age=315360000"
Header set Expires "31 December 2037 23:59:59 GMT"
`
0
Best Answer
-
x00
MVP
google is your friend.
http://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www
grep is your friend.
5
Answers
you want to redirect to www?
grep is your friend.
Yes
google is your friend.
http://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www
grep is your friend.