XAMPP中的.htaccess文件在Windows 7上不起作用

阿卜杜勒·拉赫曼(Abdul Rahman)

我的本地主机上有以下URL:

http://localhost/?cmd=causeListByCourtName 
http://localhost/?cmd=here could be any other page name

我试图重写网址,例如=

http://localhost/page/causeListByCourtName

我已经试过了:

RewriteEngine On
RewriteRule   ^pages/(.+)/?$   .+/?cmd=$1   [NC,L]    
# Handle pages requests

但是它什么也没做。我在Windows 7的httpd.conf中使用XAMPP:

LoadModule rewrite_module modules/mod_rewrite.so

已启用。我做错了什么?

巴拿马杰克

您还需要确保在找到的httpd.conf文件中都已将其更改AllowOverride NoneAllowOverride All

尝试以这种方式进行。

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^page/(.+)/?$ /?cmd=$1 [NC,L]

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

.htaccess文件在localhost XAMPP上不起作用

.htaccess在xampp Ubuntu 14.04上不起作用

.htaccess 在 xampp 中不起作用(Windows 10)

laravel 4在Windows XAMPP上不起作用

在Windows 7中创建的.htaccess文件,但在Ubuntu 12.10中不起作用

简单的RewriteRule在htaccess中的php / apache上不起作用

Contenteditable div中的文件输入在FireFox上不起作用

Django中的相对夹具路径在Windows上不起作用

为什么'ipconfig'在Windows 7上不起作用

procontroll库在Windows 7、64位上不起作用

Python子进程在Windows 7上不起作用

PHP 7在Windows 10上不起作用

Typography.Capital在Windows 7上不起作用

安装在Windows 7上不起作用

getStylesheets()。add(...)在Windows上不起作用(7)

Vaadin 7中的JavaScript在InternetExplorer 11上不起作用

.htaccess文件在LAMP中不起作用

.htaccess中的apache重写在托管平台上不起作用

Localhost .htaccess在Ubuntu上不起作用

为什么点命令(源)在zsh中没有路径的文件上不起作用?

Subprocess.Popen中的Python双引号在Windows 10上不起作用

Ajax.dll 在 IIS 7.5 Windows Server 2008 中托管的站点上不起作用

Livecode Browser中的JavaScript函数在OSX上有效,但在Windows上不起作用

.htaccess文件在服务器上不起作用

.htaccess文件在Linux服务器上不起作用

Windows 7中ActivePerl的路径不起作用

Hibernate在Windows 7 64bit中不起作用

Go程序在Windows 7中不起作用

耳机插孔在Windows 7中不起作用