The Most Active and Friendliest
Affiliate Marketing Community Online!

“Adavice”/  “CPA

How can i redirect abc & abc/index.html to www.abc.

kanavsingh

New Member
affiliate
Hi

i want to redirect the my domain urls reputationsolutions4u[dot] & reputationsolutions4u[dot]/index.html to www.reputationsolutions4u.com

I have tried adding commaind in .htaccess file but unable to do so. If this persists search engines will consider all these urls as different ones . Would really appreciate if you can provide proper instructions that can help get rid of this problem

This is what i used in .htaccess file after finding this kind of info on the internet forums

"
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^reputationsolutions4u.com$ [NC]
RewriteRule ^(.*)$ http://www.reputationsolutions4u.com$1 [L,R=301]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RedirectMatch 301 /index.aspx(.*) http://www.reputationsolutions4u.com$1
</IfModule>
# END WordPress

"
 
you Check it first on localhost
localhost/"address your file"/file name with extension.
 
Last edited by a moderator:
Add this above all thing in your htaccess file

Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^reputationsolutions4u.com [NC]
RewriteRule ^(.*)$ http://www.reputationsolutions4u.com/$1 [L,R=301,NC]
 
You are correct. I just checked the site web server.
In this case you have to add redirect rule in your web.config file as suggested by @MxyzptlkFishStix
A quick search on google suggest this-
Code:
<rewrite>
   <rules>
       <rule name="Redirect reputationsolutions4u.com to www" stopProcessing="true">
           <match url="(.*)" />
           <conditions>
               <add input="{HTTP_HOST}" pattern="reputationsolutions4u.com" />
           </conditions>
           <action type="Redirect" url="http://www.reputationsolutions4u.com/{R:0}" />
       </rule>
   </rules>
</rewrite>
 
MI
Back