-2

我在使用重定向 url 时遇到问题.htaccess

当我尝试打开该页面时,我得到一个 404 错误页面。

这是我的 htaccess 代码:

RewriteEngine on

# Force www
#RewriteCond %{HTTP_HOST} !^www\.      
#RewriteRule ^(.*)$ http://mysitename.com/myproject/$1 [R=301,L]   

Options -Indexes

RewriteRule ^newname/([0-9]+)$ index.php?stid=$1
4

1 回答 1

0

我相信您必须将要重写的 URL 指向站点根目录的基础。

RewriteRule ^newname/([0-9]+)$ /index.php?stid=$1
于 2013-03-22T19:00:11.770 回答