Forum Moderators: phranque

Message Too Old, No Replies

Problems redirect domain without www to www.domain.com

Problems redirect domain without www to www.domain.com

         

wakeup

3:29 pm on Mar 13, 2006 (gmt 0)

10+ Year Member



In my hosting I have a .htacces in www root for redirect all pages from domain.com/page.html to www.domain.com/page.html

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST}!^www\.example\.net [NC]
RewriteRule ^(.*) http://www.example.net/$1 [L,R=301]

It run ok, in folders too. But in subfolders with another .htaccess file it don't run.
I have tried to copy the same in the .htaccess in folder but it not run.
How can I solve it?
Thanks

[edited by: jatar_k at 3:40 pm (utc) on Mar. 13, 2006]
[edit reason] no urls thanks [/edit]

jdMorgan

9:27 pm on Mar 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try setting

[url=http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#RewriteOptions]RewriteOptions[/url] inherit

in your .htaccess files.

Jim

wakeup

9:34 pm on Mar 13, 2006 (gmt 0)

10+ Year Member



Hi,

I have just tried it, if I put
rewriteoptions inherit in .htacces of folder it redirect to:
http://www.example.net//www/h/h/hhdirecto.net/htdocs/letras

:(

[edited by: jdMorgan at 12:35 am (utc) on Mar. 14, 2006]
[edit reason] No URLs, please. See Terms of Service. [/edit]