开发者

How to change the url of my website to a seo friendly one?

I own this website: http://www.finalyearondesk.com . I want to change the url like : http://www.finalyearondesk.com/index.php?idname=how-to-recover-ubuntu-after-it-is-crashed to something like this: finalyearondesk.com/posts/how-to-recover-ubuntu-after-it-is-crashed using .htaccess. I don't have any knowledge of .htaccess, and I tried开发者_Go百科 a lot of tutorials available online but all effort goes to vain. So tell me how to do this.


Create a .htaccess file with this content:

RewriteEngine On
RewriteRule ^posts/([^/]*)$ /index.php?idname=$1 [L]

If it doesn't work, check that the file begins with a dot, that your hoster allows you to use .htaccess files or try to add Options +FollowSymLinks:

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^posts/([^/]*)$ /index.php?idname=$1 [L]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜