Skip to main content
Formatting
Source Link
MrWhite
  • 43.1k
  • 4
  • 50
  • 90

For example my site  : www.example.comwww.example.com

When anyone visitvisits my site  , I want them all to redirect to www.example.com/blogwww.example.com/blog

But when I open my site it should not redirect me to blog  , it should work normally. So how can I achieve the above using .htaccess?

I am going to apply the following code to redirect all pages to blog blog:

RewriteEngine on
RewriteCond %{HTTP_HOST} old\www.example.com$
RewriteRule .* http://www.example.com/blog? [L,R=301]

But how can I specify my ipIP address in above so I can access all pages and no redirects.

For example my site  : www.example.com

When anyone visit my site  , I want them all to redirect to www.example.com/blog

But when I open my site it should not redirect me to blog  , it should work normally. So how can I achieve above using .htaccess?

I am going to apply following code to redirect all pages to blog :

RewriteEngine on
RewriteCond %{HTTP_HOST} old\www.example.com$
RewriteRule .* http://www.example.com/blog? [L,R=301]

But how can I specify my ip address in above so I can access all pages and no redirects.

For example my site: www.example.com

When anyone visits my site, I want them all to redirect to www.example.com/blog

But when I open my site it should not redirect me to blog, it should work normally. So how can I achieve the above using .htaccess?

I am going to apply the following code to redirect all pages to blog:

RewriteEngine on
RewriteCond %{HTTP_HOST} old\www.example.com$
RewriteRule .* http://www.example.com/blog? [L,R=301]

But how can I specify my IP address in above so I can access all pages and no redirects.

Source Link

Want to redirect my site all pages to /blog

For example my site : www.example.com

When anyone visit my site , I want them all to redirect to www.example.com/blog

But when I open my site it should not redirect me to blog , it should work normally. So how can I achieve above using .htaccess?

I am going to apply following code to redirect all pages to blog :

RewriteEngine on
RewriteCond %{HTTP_HOST} old\www.example.com$
RewriteRule .* http://www.example.com/blog? [L,R=301]

But how can I specify my ip address in above so I can access all pages and no redirects.