0
je veux redirigercomment puis-je rediriger via htaccess
http://abc.com/a to /mypage.php?par1=a and
http://abc.com/a/b to /mypage.php?par1=a&par2=b
comment peut-il être fait?
je veux redirigercomment puis-je rediriger via htaccess
http://abc.com/a to /mypage.php?par1=a and
http://abc.com/a/b to /mypage.php?par1=a&par2=b
comment peut-il être fait?
Ce qui suit devrait être suffisant:
<IfModule mod_rewrite.c>
RewriteBase/
#so i doesn't match a real file/folder
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(\w+)$ mypage.php?par1=$1
RewriteRule ^(\w+)/(\w+)$ mypage.php?par1=$1&par2=$2
</IfModule>