I have my website www.askwhiz.com The blog is at http://www.askwhiz.com/blog/ I used to have a permanent redirect earlier. from www.askwhiz.com to www.askwhiz.com/blog/ Accidently it got deleted. Now when i add the redirect. everything redirects to the blog folder which is http://www.askwhiz.com/blog/ Even when i click http://www.askwhiz.com/forum/ i goto the blog folder. help apprciated. below is my .htaccess data <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> RewriteEngine on RewriteCond %{HTTP_HOST} ^askwhiz.com$ [OR] RewriteCond %{HTTP_HOST} ^www.askwhiz.com$ RewriteRule ^.*$ "http\:\/\/www\.askwhiz\.com\/blog\/" [R=301,L] Code (markup):
Try removing this bit RewriteEngine on RewriteCond %{HTTP_HOST} ^askwhiz.com$ [OR] RewriteCond %{HTTP_HOST} ^www.askwhiz.com$ RewriteRule ^.*$ "http\:\/\/www\.askwhiz\.com\/blog\/" [R=301,L] Code (markup):
actually, i want my homepage to go to the blog directory. I am looking http://www.askwhiz.com to redirect to http://www.askwhiz.com/blog/
try this: RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?askwhiz.com$ [NC] RewriteCond %{REQUEST_URI} !^/blog/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /blog/$1 RewriteCond %{HTTP_HOST} ^(www.)?askwhiz.com.com$ RewriteRule ^(/)?$ blog/index.php [L] Code (markup):
@lachrymologist that code just gives me a blank index page and doesnt redirect when i type homepage url. i really need help on this. I ve started to lose traffic and pages are getting unindexed.