Mobile traffic of my second site redirected to my base site [Edited,have a look] [closed]

Mobile traffic of my second site redirected to my base site [Edited,have a look] [closed] - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Mobile traffic of my second site redirected to my base site [Edited,have a look] [closed] error on your web browser. Problem :






I have a strange issue with my website and it seems i am unable to understand what cauese the problem.I would highly appreciate your help.The Scenario is



I have two websites.




  1. Website A

  2. Website B



Website A is simply hosted within the root directory of my hosting account.Within this root *directory* i have a sub folder " subfolder A " and within which is another subfolder " subfolder B " that contains my site Website B



so the path looks like



root/sublfolder_A/subfolder_B/



that contains my **Website B ( i.e subfolder_B) **



All goes fine.When i access the website B from my desktop/Laptop Website B is loaded normally.



but when i access the Website through a mobile device , mobile site of Website A is loaded while as it should load website_B



Also , to let you know , both websites have different URL's and not subdomain's or anything.



What could be the problem ?
htaccess of website B or website A ? or something else ?



Here is the htaccess of my website B



RewriteEngine On 
RewriteRule .* index.php [F]
RewriteBase /
RewriteRule .* - [E=HTTP_AUTHORIZATION:%HTTP:Authorization]
RewriteCond %REQUEST_URI /component/|(/[^.]*|.(php|html?|feed|pdf|vcf|raw))$ [NC]
RewriteCond %REQUEST_FILENAME !-f RewriteCond %REQUEST_FILENAME !-d
RewriteRule .* index.php [L]

Solution :

It sounds like you haven't properly configured your web server. Since you've mentioned .htaccess files I'm going to assume that you're using Apache web server. Depending on your OS the layout of your web server configuration will vary. If you're using a Redhat variant or Windows then your configuration will all probably be in one file. If you are using a Debian variant then you likely have a site-available and sites-enabled directory with each site in separate files. Figure out how yours are laid out and look for the VirtualHost configurations. In the configurations which use files in site-available this will go in 2 separate files and in the more standard installations this will all be near the end of httpd.conf. Here is a sample configuration script which does what you are trying to do:



# Ensure that Apache listens on port 80
Listen 80

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /www/example1
ServerName www.example.com

# Other directives here

</VirtualHost>

<VirtualHost *:80>
DocumentRoot /www/example2
ServerName www.example.org

# Other directives here

</VirtualHost>


http://httpd.apache.org/docs/2.2/vhosts/examples.html



I would put these two sites in the same directory as they have done in the sample. If the content of the two sites are the same then I wouldn't use separate DNS names. Just use separate virtual host name. So name the sites: www.yoursite.com and mobile.yoursite.com.



Once that is setup you'll probably want to redirect to the mobile site automatically when someone visits with a mobile device. This is a long topic in itself so I'll leave that as further reading.



http://www.designyourway.net/blog/resources/detecting-and-redirecting-mobile-users/
OR Google https://www.google.com/search?q=automatic+redirect+mobile+devices


We hope that this article has helped you resolve the htaccess, redirects, error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=