I want to rewrite to
I have several questions:
I tried the following already:
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ [L,R=301]
and
RewriteCond %{HTTP_HOST} !^ [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/?(.*) [L,R,NE]
What's the difference and is one "better" then the other?
Next thing I want to do is the following:
In a folder named /blog/ I installed Joomla! 1.5.15 so I have items>.
Joomla! uses its own .htaccess file so I will need to put a rewrite rule in that .htaccess as well to acomplish the same thing: rewrite none to URL's with www.
To accomplish this, I used the same rules as I gave above but that doesn't work.
This first rewriterule rewrites me to the and not to the article in the blog.
The second rule shows to be more promising but isn't fully what I want. The second rule rewrites the url to:
items>
and not:
items>
what it should be.
Now I can fix this by doing either the following 2 options:
RewriteCond %{HTTP_HOST} !^ [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/?(.*) [L,R,NE]
RewriteCond %{HTTP_HOST} !^ [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/?(.*) [L,R,NE]
Again the question, which one is better or am I approaching this completely the wrong way?
Thanks in advance for any help provided
I have several questions:
I tried the following already:
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ [L,R=301]
and
RewriteCond %{HTTP_HOST} !^ [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/?(.*) [L,R,NE]
What's the difference and is one "better" then the other?
Next thing I want to do is the following:
In a folder named /blog/ I installed Joomla! 1.5.15 so I have items>.
Joomla! uses its own .htaccess file so I will need to put a rewrite rule in that .htaccess as well to acomplish the same thing: rewrite none to URL's with www.
To accomplish this, I used the same rules as I gave above but that doesn't work.
This first rewriterule rewrites me to the and not to the article in the blog.
The second rule shows to be more promising but isn't fully what I want. The second rule rewrites the url to:
items>
and not:
items>
what it should be.
Now I can fix this by doing either the following 2 options:
RewriteCond %{HTTP_HOST} !^ [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/?(.*) [L,R,NE]
RewriteCond %{HTTP_HOST} !^ [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/?(.*) [L,R,NE]
Again the question, which one is better or am I approaching this completely the wrong way?
Thanks in advance for any help provided