Forum Moderators: phranque
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://example.com/no2/$1 [R=301,L]
This webpage has a redirect loop.
The webpage at http://example.com/no2/ has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
Here are some suggestions:
Reload this web page later.
Learn more about this problem.
More information on this error
RewriteCond $1 !^no2/ RewriteCond %{REQUEST_URI} !^/no2/
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://example.com/no2/$1 [R=301,L]
"If the requested URL-path does not already start with 'no2/', then add 'no2/' to the beginning of the URL-path and redirect the client to that new URL."
example2.com to http://example.com/no2. Wouldn't the code that you have provided mean I shall be adding an extra "no2" to my destination URL? [edited by: anand84 at 11:08 am (utc) on Apr 24, 2010]
Options +FollowSymLinks -Indexes -MultiViews
RewriteEngine on
#
rewritecond %{http_host} ^example1.com
RewriteRule ^(.*)$ http://example.com/no2/$1 [R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Options +FollowSymLinks -Indexes -MultiViews
RewriteEngine on
#
RewriteCond %{HTTP_HOST} !^(www\.)?(example1)\.com
RewriteRule ^(.*)$ http://example.com/no2/$1 [R=301,L]
Checks for NOT www.example1.com or example1.com and matches any URL-path request (.*) and redirects it to example.com/no2/
RewriteCond %{HTTP_HOST} !^(www\.)?example\.com
RewriteRule ^(.*)$ http://example.com/no2/$1 [R=301,L]