我正在MAMP上构建我的站点,几天后,我终于在我的遗嘱之后得到了一个.htaccess文件。但是现在当我上传到生活环境时,它的行为就不一样了!有不同的版本吗?是因为我文件中的错误,MAMP是自动处理的吗?
如果不是这些特殊文件,则使用默认的RewriteRule。scripts/images/mediacontent/services/robot.txt工作,但不工作(login.php,杂交瘤,博客)
#start
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
# main site
RewriteCond %{REQUEST
我的意思是,假设我为用户本身创建了一个页面:localhost/blog/profile/ImUser1
我想为用户提供其他页面,如:localhost/blog/profile/ImUser1/my_subscribers或localhost/blog/profile/ImUser1/my_posts
我如何创建这样的页面,比如订阅者页面?
我当前的.htaccess代码:
RewriteEngine On
CheckCaseOnly On
CheckSpelling On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_F
我已经检查过了,MOD重写已经在服务器上启动并运行。
请求网址为: http ://www.mydomain.com/user/123456
.htaccess规则:RewriteRule ^/user/(.*)$ /user.php?user=$1 [L,QSA]
因此,从理论上讲,它应该在内部使用变量user.php重定向到php脚本u=123456,但是什么都没有发生?我该如何调试呢?
Not Found
The requested URL /user/65464654 was not found on this server.
对于我的WordPress项目,当我试图将permalink设置为Postname: http://10.60.8.118/projectname/sample-post/时,我将得到错误The requested URL /projectname/pagename/ was not found on this server.。这个项目是托管在我的Ubuntu机器上的。
我能够查看设置为Plain: http://10.60.8.118/projectname/?p=123的页面或帖子
早期的.htaccess是不可写的。所以我改变了它,现在它可以写了。
含量.htaccess
#