简体   繁体   中英

rewrite code in php

I have a problem with my client website.

my client website is xyz.com/abc.php but unfortunately one of our external link webmaster has given slash at the end of the url as xyz.com/abc.php/

now problem is google is reading text version pages of all the abc.php as duplicate content pages as cache text only version.

My webdeveloper has confirmed that these type of text version pages are not available in our root directory.

Then how google is creating new pages in text version and indexing.

is there is any problem in writing rewriting code?

Kindly help me out/

If I understand your question correctly, it seems like Google is indexing multiple copies of your content with slightly different URLs. If this is the case, then common SEO wisdom stipulates that duplicative content on a site does not help search engine page rank.

I would recommend using Apache URL rewriting to issue HTTP 301 Moved Permanently redirects for problem URLs, effectively telling search engines that the content is no longer available at problem URLs and that such URLs should not be indexed.

could it be to do with relative linking to the css

ie xyz.com/layout.css and xyz.com/abc.php/layout.css

if you are linking to the css using just the relative link layout.css then it will add after the abc.php/ (xyz.com/abc.php/layout.css). whereas if you use /layout.css it'll go to the root url xyz.com then add /layout.css (xyz.com/layout.css).

alternatively put all css etc. links in as absolute http:// www.xyz.com/layout.css

hope that makes sense and helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM