开发者

file name in the url

开发者 https://www.devze.com 2023-02-03 05:21 出处:网络
hello guys i want to make m开发者_如何学JAVAy download system like /download?file=815|file_name and i already did that

hello guys i want to make m开发者_如何学JAVAy download system like

/download?file=815|file_name

and i already did that but when it appear in the google search in appear like

download?file=815%7Cfile_name

do you think is that good idea to add the file name in the url as a just name no variable


using special chars in the URL is not a good idea. What you can do is forgetting the standard url and use something like this : /download/815/filename and then use the URL Rewrite engine of apache.

http://httpd.apache.org/docs/2.0/misc/rewriteguide.html


Just use the file id download?file=8155555, I assume the path of the file is mapped to your db somewhere


Its not secure, But you like to use this format of url, You should check that urls variables/inputs by php user input injection methods.

Thats will help to secure your website.

1 more. In SEO purpose, good to skip the special symbols in the urls.

0

精彩评论

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