HuyPV
Monday, September 15, 2014
Create .htaccess file
Write some rules:
# No www
RewriteCond %{HTTP_HOST} ^www\.code\.huypv\.net [NC]
RewriteRule ^(.*)$ http://code.huypv.net/$1 [L,R=301]
Access http://www.code.huypv.net/
No redirect to http://code.huypv.net/
- Step 1: Check .htaccess is used
+ Write invalid code
+ Get error page "Internal server error"
- Step 2: Fix .htaccess file
+ Add this line to begining of .htaccess file
RewriteEngine on
# No www
RewriteCond %{HTTP_HOST} ^www\.code\.huypv\.net [NC]
RewriteRule ^(.*)$ http://code.huypv.net/$1 [L,R=301]
+ And now, it works (for me :p)
Title:
Check .htaccess is not working
Description:
Create .htaccess file Write some rules: # No www RewriteCond %{HTTP_HOST} ^www\.code\.huypv\.net [NC] RewriteRule ^(.*)$ http://code.hu...
...
Rating:
4