简体   繁体   English

友好的SEO网址

[英]Friendly SEO URLs

I need to know how to make SEO friendly URLs, say I have a URL in this format http://www.domain.com/file.php?v1=a ... Now I need users to use http://www.domain.com/a and this redirects to the previous ... 我需要知道如何制作SEO友好的URL,比如说我有一个格式为http://www.domain.com/file.php?v1=a的URL ...现在我需要用户使用http://www.domain.com/a ,这将重定向到上一个...

How can this be achieved? 如何做到这一点?

And for say http://www.domain.com/folder1 how can I force it to go to http://www.domain.com/folder2 via .httaccess? 可以说http://www.domain.com/folder1如何强制通过.httaccess转到http://www.domain.com/folder2

Thanks in advance. 提前致谢。

Ok, I managed to find a solution for both questions ... 好的,我设法找到了两个问题的解决方案...

1) 1)

RewriteEngine on
RewriteRule ^([^/]+)/([^/]+).*$ $1.php?id=$2 [L]

2) 2)

RewriteEngine On
RewriteRule ^folder1$ folder2 [PT,L]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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