Forum Moderators: phranque
From both www and non-www, or from just one? If so, which one?
Preserve the www or non-www origin, or redirect both to the canonical form?
Redirect when only the exact foldername is requested, or redirect for all files within the folder too?
Preserve filenames within the folder, or strip the filenames in the redirect?
Preserve query strings, or strip them?
just one explicitly named folder
for both, www and non-www
can i have examples of [ Preserve filenames within the folder] **AND** [strip the filenames]
same as [Preserve query strings, or strip them?] can i have example of but..
ok the story is i created a mobile content pages from my main site pages in a sub folder.
main site = example.com/
mobile pages section = example.com/mobile/index.php
google has come back and slap me with duplicate penalty. It did find main site links on the mobile content section and i have fix those but i feel that if by using sub-folder its still a duplicate i will host in a different complete domain site. So i want to redirect the mobile page to the main site page.
Also can i ask a question..if on you main site you have content A. then you create a page just for mobile devices in a sub folder and place a modified content A but for just mobile devices. Is this still a duplicate.
Note that while Yahoo and MSN use a subdomains for mobile pages, Google uses a subdirectory. Either approach should be fine, and not cause duplicate-content problems in itself.
Make sure your mobile pages are written in xhtml+xml, WML, or cHTML, and declare the proper DocType and encoding (usually UTF-8). Make sure that the Content-Type (MIME-type) headers returned with documents reflect those settings. Make sure the documents validate to the declared DOM and namespace in the DocType.
If you use a sitemap, be sure to declare <mobile:mobile /> in each <url> section of the sitemap.
Do not automatically redirect mobile devices based on the user-agent prefix only; Check to be sure it is not a search engine spider before doing this.
Finally, these mobile pages should be significantly smaller than the "normal" Web pages. The <title>, <description>, and on-page text should all be significantly shorter than those on your regular Web pages.
With all the above, you should not have any duplicate-content problems.
(Also, you have my sympathy -- I've gone through the "add a mobile section" process before, and the absolute lack of useful documentation for Webmasters is stunning.)
It is our procedure here to ask that you post your own code --your best effort-- to serve as a basis for discussion. This gives us a chance to avoid needless discussion of things you may already know. Please see our forum Charter for more info.
Thanks,
Jim
Appreciate your comments and advise. For now i will put aside setting up mobile pages. I would rather focus on the main site.
Now regarding my original question...what code should i put in my htaccess to redirect a file in a sub folder to another file in the root directory. For example
sub folder - http://www.example.com/mobile/filename.php
need to redirect to another file in root directory - http://www.example.com/destinationfile.php.
Thanks
jpservicez
Thanks,
Jim
Experiment on your dev server until it works, and post your best effort here if you can't get it to work as expected.
There's a world of learning to be had by installing Apache and PHP on a spare machine in your office and just experimenting.