<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^game/([0-9]+)/.+\.html$ file.php?f=$1 RewriteRule ^category/([0-9]+)/.+/([0-9]+)\.html$ browse.php?c=$1&p=$2 RewriteRule ^category/([0-9]+)/.+/?$ browse.php?c=$1 RewriteRule ^profile/([0-9]+)/.+\.html$ profile.php?u=$1 RewriteRule ^page/([0-9]+)\.html$ page.php?p=$1 RewriteRule ^scores/([0-9]+)/([0-9]+)\.html$ scores.php?f=$1&p=$2 RewriteRule ^game/[0-9]+/(newscore|index)\.php$ $1.php RewriteRule ^game/[0-9]+/arcade/gamedata/(.*)$ arcade/gamedata/$1 [L] </IfModule> Code (markup): This is my Htaccess, I tried putting: RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^/(.*)$ http://%1/$1 [R] Code (markup): But didn`t work. I want if a user enter www.site.com the htaccess to redirect him to site.com Thanks
try this: RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ http://%1$1 [R=301,L] Code (markup): it should work,
you must creat an .htaccess - open and put this code in: Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} ^www.YourSite.com RewriteRule (.*) http://YourSite.com/$1 [R=301,L] then upload into your file pages