0

当我更改链接时,它会显示一个错误页面。也许我的网站有问题你怎么看?我的网站中有网址:www.mywebsite.com/picture.php?1,我想将其更改为:www.mywebsite.com/picture/1

这是我的 .htaccess

RewriteEngine on
rewritecond %{http_host} ^website.com [nc]
rewriterule ^(.*)$ http://www.mywebsite.com/$1 [r=301,nc]

RewriteRule ^contact\/?$ contact.php [L]
RewriteRule ^terms\/?$ terms.php [L]

**RewriteRule ^picture/(.*)/$ picture.php?$1 [L]**

请帮忙,我不知道是什么问题。

4

2 回答 2

1

Try adding

<base href="www.mywebsite.com" />

At the top of your page, this might work.

EDIT:

Try using this rewrite rule

RewriteRule picture/(.*)/$ /picture.php?$1 [L, NC]
于 2012-04-24T12:02:37.337 回答
0

假设您的 htaccess 的第一部分有效,请将最后一行替换为以下内容:

   RewriteRule ^picture/(.*)$ /picture.php?$1 [NC]
于 2012-04-24T12:21:27.990 回答