简体   繁体   中英

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 ...

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?

Thanks in advance.

Ok, I managed to find a solution for both questions ...

1)

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

2)

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

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