127.0.0.1/asd不能在ubuntu环境下工作

时间:2012-10-23 09:05:36

标签: apache .htaccess ubuntu webserver

我正在开发微软环境,但是现在我将我的网站移到了ubuntu,问题是,当我尝试写这样的链接时,127.0.0.1 / asd,我找不到错误,这让我感到困惑疯狂的是,有时工作的URL有时不起作用,它在Windows环境下工作得很好,这是我得到的错误,

Not Found The requested URL /asd was not found on this server.

这是我的.htaccess,

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
# Or, compress certain file types by extension:
<files *.html>
SetOutputFilter DEFLATE
</files>
RewriteEngine On
RewriteRule ^([//a-zA-Z0-9_-]+)$ tab.php?tab_id=$1 [QSA,L]

1 个答案:

答案 0 :(得分:1)

您的问题似乎是您的重写规则 - “//”应该是“\ /” - 您的apache conf文件是什么样的,是否为该目录启用了.htaccess?