HTACCESS Problem. Please Help

seoconsultant2005

Junior Member
Joined
Dec 9, 2008
Messages
129
Reaction score
661
Hi,

I recently upload a newly made website and now I am facing many problems.

First thing is my website address is

www.seosem-india.com

I want htaccess code to redirect all request to non-www domain. http://seosem-india.com

second thing is, I have wordpress installed in sub directory.

http://seosem-india.com/SEO-Blog/

I tried some htaccess code but everytime I face some problem.

Can someone please post here the code for htaccess for

non-www redirect code
wordpress htaccess code to get search enigine friendly URL.

Also, please post which code in which htaccess file I need to upload on root or sub-domain.


Thanks
Pearl
 
edit root httaccess add this

#RewriteCond %{HTTP_HOST} ^(.+).seosem-india.com [NC]
#RewriteRule ^(.*)$ http://seosem-india.com/$1 [R=301,NC,L]


not sure if this will work but worth a shot.

good luck.
 
edit root httaccess add this

#RewriteCond %{HTTP_HOST} ^(.+).seosem-india.com [NC]
#RewriteRule ^(.*)$ http://seosem-india.com/$1 [R=301,NC,L]


not sure if this will work but worth a shot.

good luck.

Thanks... I am gonaa try this.
 
Can somebody please help... my website is only opening without www if I enter www it shows page not found
 
wordpress automatically changes the .htaccess from settings->permalinks

as for www to non-www this code should do the trick:
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.seosem-india\.com$ [NC]
RewriteRule ^(.*)$ http://seosem-india.com/$1 [R=301,L]
 
edit root httaccess add this

#RewriteCond %{HTTP_HOST} ^(.+).seosem-india.com [NC]
#RewriteRule ^(.*)$ http://seosem-india.com/$1 [R=301,NC,L]


not sure if this will work but worth a shot.

good luck.

that will never work because of the # which means the line is comment
 
hxpdx's code should do the trick. Just add it above any code that came with your site.
 
wordpress automatically changes the .htaccess from settings->permalinks

as for www to non-www this code should do the trick:
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.seosem-india\.com$ [NC]
RewriteRule ^(.*)$ http://seosem-india.com/$1 [R=301,L]

Thanks I am gona try this... meanwhile can you please check if my website is opening with www and with non-www as well. Becuase its not opening for me when i type www :(
 
What browsers are you using? I just tried and that RewriteRule appears to be in place. Did you change your host or nameserver recently.
 
What browsers are you using? I just tried and that RewriteRule appears to be in place. Did you change your host or nameserver recently.

I bought a new domain and hosting on 31st of Jan and from last 9 days I am trying to solve this issue.

I have firefox 3.0.6 & IE 7

working without typing www but if i type www it just show me page not found
 
You may need to flush DNS as it sounds like your PC is relating to the old IP that the domain was hosted on.
 
open up start menu click run, type cmd
then type

ipconfig /flushdns

and then close all browser windows. wait 5 minutes.

In vista just type ipconfig /flushdns into that dumb ass fucking search box in the start menu that always gets in the way for me.
 
Works both ways for me too...
Empty cache and cookies as you must have used a 301 redirection with the wrong Apache mode rewrite syntax.
That should be OK then ;)
 
open up start menu click run, type cmd
then type

ipconfig /flushdns

and then close all browser windows. wait 5 minutes.

In vista just type ipconfig /flushdns into that dumb ass fucking search box in the start menu that always gets in the way for me.

Sad :( after doing this its still shows me "Address not found" but at the same time if I type "seosem-india.com" it works fine but not with www.seosem-india.com.

That is becoming a problem for me it does work for you but not for me and not even on my friends computer.

Well I am from India - New delhi. It seems that no one able to access website with www in India.
 
open up start menu click run, type cmd
then type

ipconfig /flushdns

Then RESTART.

And try again, it sometimes takes a couple days to clear up, try clearing cookies, temp data, content cache, restarting and try again.
 
Yeah, it very well could be on your ISP's end. Do you and all of your friends all get your internet access from the same company? Sometimes to cut down on load and bandwidth, ISP's won't update their DNS entries for a few days at a time.
 
Yeah, it very well could be on your ISP's end. Do you and all of your friends all get your internet access from the same company? Sometimes to cut down on load and bandwidth, ISP's won't update their DNS entries for a few days at a time.

I tell you something ... the best part is I myself has 3 type of connections (ISP) doesnt work on any1 not on other ISP's as well.
 
Back
Top