开发者

How to hide file path in URL?

What would be the best way to way to change 开发者_如何转开发my URL address to a custom one? Currently my website shows:

http://nkonecny.com/_pages/_portfolio/port.html

I want to change it to something like this:

http://nkonecny.com/portfolio


You can use mod_rewrites.

Here is a good linux/apache tutorial


.htaccess would be the best option.

http://httpd.apache.org/docs/1.3/howto/htaccess.html


mod_rewrite will do rewrites of this sort, but your pages have to follow a fairly strict naming/pathing convention for it to work. If you've got arbitrary path->names, then this won't work and you'll probably have to resort to a series of Apache 'Alias' directives.


You want to use URL rewriting. If you are using apache, you can get full information here: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜