未找到:在此服务器上未找到请求的URL/viewprofile.php

未找到:在此服务器上未找到请求的URL/viewprofile.php,php,.htaccess,wampserver,Php,.htaccess,Wampserver,我的网站有问题,我无法查看viewprofile.php 这是我的.htaccess文件 RewriteEngine on RewriteRule (.*)-(.*).htm$ viewprofile.php?id=$1 RewriteRule (.*).htm$ viewprofile.php?id=$2 RewriteRule viewads(.*)\.htm$ viewads.php?id=$1 RewriteRule (.*)&(.*)\.htm$ homeads.php?id=

我的网站有问题,我无法查看
viewprofile.php

这是我的
.htaccess
文件

RewriteEngine on
RewriteRule (.*)-(.*).htm$ viewprofile.php?id=$1
RewriteRule (.*).htm$ viewprofile.php?id=$2
RewriteRule viewads(.*)\.htm$ viewads.php?id=$1
RewriteRule (.*)&(.*)\.htm$ homeads.php?id=$2
RewriteRule (.*).htm$ profile_city.php?id=$1
RewriteRule (.*).htm$ profile_cast.php?id=$1


RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
ErrorDocument 404 /viewprofile.php

RewriteEngine on
RewriteCond %{HTTP_HOST} ^waytonikah.com [NC]
RewriteRule ^(.*)$ http://waytonikah.com/$1 [L,R=301]

这是一个重定向循环:

RewriteCond %{HTTP_HOST} ^waytonikah.com [NC]
RewriteRule ^(.*)$ http://waytonikah.com/$1 [L,R=301]
这条规则的作用是:

  • URL是
    http://waytonikah.com/
    ,已提出请求
  • 主机是waytonikah.com吗
  • 如果是,则重定向到
    http://waytonikah.com/
  • URL是
    http://waytonikah.com/
    ,已提出请求
  • 主机是waytonikah.com吗
  • 如果是,则重定向到
    http://waytonikah.com/

  • 等等。

    如果你给我们一些代码,那么我想我昨天也看到了同样的问题。.试着在规则前面加上一个
    ^
    RewriteRule^(.*).htm$viewprofile.php?id=$2
    ,然后试着看看url是否工作,可能是重复的