开发者

create htaccess for site

what is it ?

convert :

htt开发者_JAVA技巧p://name.com/pro/weblog/index.php?rayan_cat=23&rayan_cat_in=25

to :

http://name.com/pro/weblog/23/25/

if index.php the time was not known


It's called URL rewriting. See: http://httpd.apache.org/docs/current/mod/mod_rewrite.html


RewriteEngine On
RewriteCond %{HTTP_HOST} ^http://Yoururl/
RewriteRule (.*) http://yoururl//$1 [R=301,L]


RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)/([0-9]+)$ index.php?rayan_cat=$1&rayan_cat_in=$2
RewriteRule ^([a-zA-Z0-9_-]+)/([0-9]+)/$ index.php?rayan_cat=$1&rayan_cat_in=$2

replace the YOUR URL and save the file as .htaccess in the root folder

now using GET Method you can fetch the parameter value .

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜