Mod rewrite Apache2.2 mod_重写

Mod rewrite Apache2.2 mod_重写,mod-rewrite,apache2.2,Mod Rewrite,Apache2.2,我有一个网页,并希望使用重写模块,使网址更加用户友好。我想重写这些(用户输入): 。。对这些: http://domain.com/folder/?id=page1 http://domain.com/folder/?id=page2 http://domain.com/folder/?id=pagen 你能帮我写一下.htaccess吗?Aw。。。与此同时,在我吃过午饭后,我用以下方法解决了问题: <IfModule mod_rewrite.c> RewriteEngin

我有一个网页,并希望使用重写模块,使网址更加用户友好。我想重写这些(用户输入):

。。对这些:

http://domain.com/folder/?id=page1
http://domain.com/folder/?id=page2
http://domain.com/folder/?id=pagen

你能帮我写一下.htaccess吗?

Aw。。。与此同时,在我吃过午饭后,我用以下方法解决了问题:

<IfModule mod_rewrite.c>
    RewriteEngine On

    # If the requested url is not an existing file.. 
    RewriteCond %{REQUEST_FILENAME} !-f

    # .. neither an existing folder ..
    RewriteCond %{REQUEST_FILENAME} !-d

    # .. substitute it with the augmented index.php!
    RewriteRule (.*) index.php?id=$1 [L]
</IfModule>

重新启动发动机
#如果请求的url不是现有文件。。
重写cond%{REQUEST_FILENAME}-F
# .. 既不是现有文件夹。。
重写cond%{REQUEST_FILENAME}-D
# .. 用augmented index.php替换它!
重写规则(.*)index.php?id=$1[L]
谢谢你的关注!:)

<IfModule mod_rewrite.c>
    RewriteEngine On

    # If the requested url is not an existing file.. 
    RewriteCond %{REQUEST_FILENAME} !-f

    # .. neither an existing folder ..
    RewriteCond %{REQUEST_FILENAME} !-d

    # .. substitute it with the augmented index.php!
    RewriteRule (.*) index.php?id=$1 [L]
</IfModule>