Php 使用wamp服务器在本地主机上重写htaccess错误
我试图为本地服务器重写Php 使用wamp服务器在本地主机上重写htaccess错误,php,.htaccess,url-rewriting,wamp,Php,.htaccess,Url Rewriting,Wamp,我试图为本地服务器重写htaccess 这是我的本地URL 我需要类似于此页面的内容: 我试过了,但不起作用。将您的htaccess文件更改为: Options +FollowSymLinks RewriteEngine on RewriteCond %{THE_REQUEST} ^(GET|POST)\ /index\.php\?var=(.*)\ HTTP RewriteRule ^ /index/%2\? [R=302,L] RewriteRule ^index/(.*)$ /ind
htaccess
这是我的本地URL
我需要类似于此页面的内容:
我试过了,但不起作用。将您的htaccess文件更改为:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^(GET|POST)\ /index\.php\?var=(.*)\ HTTP
RewriteRule ^ /index/%2\? [R=302,L]
RewriteRule ^index/(.*)$ /index.php?var=$1 [L]
以上内容应更改
http://kiwitravel.localhost/index.php?var=home
至http://kiwitravel.localhost/index/home
您使用的是框架吗?您可以发布htaccess文件的内容吗?你说它不起作用。会发生什么?它是否给出了500个错误?不,我没有使用框架。选项+FollowSymLinks RewriteEngine on RewriteRule/var/(.*)/index.php?var=$1这是htacces.showign 5oo错误您的htaccess文件中还有什么其他内容吗?在url栏中,它是显示旧url(index.php?var=value
)还是显示新url(index/value
)仍然像index.php?var=value一样,您的htaccess文件中只有上述代码,并且该文件与index.php是?ya..htaccess和index file是同一文件夹。