문제

I've a page that shows the last 10 articles of a database, and, with the $_GET['show-all'] variable, it shows all the articles.

Now, I want to use permalink. For the 'standard' page, the permalink is

/articles

for the second one, I might use this

/articles/show-all

But search engines as Google recognizes it as another page, and generated a duplicated meta-tag error. So I want to use this permalink instead

/articles/?show-all

But all my attempts didn't work. I tried this code in the .htaccess file:

RewriteRule ^articles/?(.*)$ /3/contents.php?p=articles&$1 [L]

or

RewriteRule ^articles/\?(.*)$ /3/contents.php?p=articles&$1 [L]    
도움이 되었습니까?

해결책

Take a look at the canonical tag

http://en.wikipedia.org/wiki/Canonical_link_element

to avoid "duplicate content" ;)

다른 팁

Try to always use a trailing slash or not.

Since /name != /name/

Therefore go for /name?param in your case.

this topic has a lot of information about it by the way: When should I use a trailing slash in my URL?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top