View Full Version : 301 redirect not working loosing traffic
sash_007 02-03-2010, 04:07 AM Hello friends,
i tried to make aredirect of my blog http://www.neophytech.com/blog/ to http://www.webdesigncut.com/blog/ with cpanel but failed done this succesfully with other pages
already tried
RewriteEngine on
RewriteCond %{HTTP_HOST} ^blog.neophytech.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.blog.neophytech.com$
RewriteRule ^/?$ "http\:\/\/www\.webdesigncut\.com\/blog\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^neophytech.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.neophytech.com$
RewriteRule ^blog\/?$ "http\:\/\/www\.webdesigncut\.com\/blog\/" [R=301,L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^blog.neophytech.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.blog.neophytech.com$
RewriteRule ^/?$ "http\:\/\/www\.webdesigncut\.com\/blog\/" [R=301,L]
Try this rule
RewriteCond %{HTTP_HOST} ^www\.neophytech\.com\/blog$
RewriteRule ^/?$ "http\:\/\/www\.webdesigncut\.com\/blog\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^www.neophytech.com/blog$
RewriteRule ^/?$ "http\:\/\/www\.webdesigncut\.com\/blog\/" [R=301,L]
none wrked:confused:
thinkovi 02-03-2010, 06:17 AM Try putting the .htacces file inside your blog/ subdirectory and add this code to it
RewriteEngine on
RedirectMatch 301 (.*) http://www.webdesigncut.com/blog/
sash_007 02-03-2010, 07:48 AM Try putting the .htacces file inside your blog/ subdirectory and add this code to it
you mean in my new domain webdesigncut can i have more than 1 .htaccess file i alredy have one in root
thinkovi 02-03-2010, 11:06 AM Yes, you can have move than 1 .htaccess
NoSupportLinuxHostin 02-03-2010, 01:50 PM Yeah, Apache will look in the current folder for a .htacess file and then it will look in the parent folder.
sash_007 02-04-2010, 01:44 AM Try putting the .htacces file inside your blog/ subdirectory and add this code to it
i tried this
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
RedirectMatch 301 (.*) http://www.webdesigncut.com/blog/
</IfModule>
# END WordPressbut it failed:confused:
sash_007 02-04-2010, 02:12 AM and i get this error
Moved Permanently
The document has moved here.
Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 Server at www.webdesigncut.com Port 80
That... isn't going to work, at all. The -match- needs to have characters escaped, the target does not.
RewriteEngine on
RewriteCond %{HTTP_HOST} neophytech\.com$
RewriteRule ^.*$ http://www.webdesigncut.com/blog/ [R=301,L]
Is all you need. You can be more specific with the host match if you like, as well:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(blog|www)\.neophytech\.com$
RewriteRule ^.*$ http://www.webdesigncut.com/blog/ [R=301,L]
sash_007 02-04-2010, 03:32 AM That... isn't going to work, at all. The -match- needs to have characters escaped, the target does not.
RewriteEngine on
RewriteCond %{HTTP_HOST} neophytech\.com$
RewriteRule ^.*$ http://www.webdesigncut.com/blog/ [R=301,L]
Is all you need. You can be more specific with the host match if you like, as well:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(blog|www)\.neophytech\.com$
RewriteRule ^.*$ http://www.webdesigncut.com/blog/ [R=301,L]
i tried your code in the ,htaccess file within the blog directory of my new domain webdesigncut but it failed:s
HostXNow 02-04-2010, 06:48 AM Just add this:
RewriteRule (.*) http://www.webdesigncut.com/blog/$1 [R=301,L]
to the .htaccess file located at http://www.neophytech.com/blog/
sash_007 02-04-2010, 08:11 AM Just add this:
to the .htaccess file located at http://www.neophytech.com/blog/
tried this
RewriteCond %{HTTP_HOST} ^neophytech.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.neophytech.com$
RewriteRule ^blog\/?$ "http\:\/\/webdesigncut\.com\/blog\/" [R=301,L]
RewriteRule (.*) http://www.webdesigncut.com/blog/$1 [R=301,L]
failed:look::wallbash:
HostXNow 02-04-2010, 08:21 AM RewriteRule ^blog\/?$ "http\:\/\/webdesigncut\.com\/blog\/" [R=301,L]
RewriteRule (.*) http://www.webdesigncut.com/blog/$1 [R=301,L][/HTML]
Those are conflicting with each other. :o
Remove: RewriteRule ^blog\/?$ "http\:\/\/webdesigncut\.com\/blog\/" [R=301,L] and it should work.
Edit: so it should be like this:
Options All -Indexes
Options +FollowSymLinks
RewriteEngine On
RewriteRule (.*) http://www.webdesigncut.com/blog/$1 [R=301,L]
sash_007 02-04-2010, 08:55 AM i tried removing it didnt worked:confused:
HostXNow 02-04-2010, 09:31 AM i tried removing it didnt worked:confused:
Your host should be able to fix this for you, as they have access to the server your site is hosted on.
There could be a misconfiguration in the server. If there is, then only your host will be able to fix the problem for you.
|