doujiene2845 2016-03-29 14:39
浏览 97

无法将我的页面重定向到WAMP SERVER中的index.php

I have copied my code from LINUX (which is perfectly working) to Windows where I am using WAMP server to practice web development. I don't understand why my pages are not being redirected to index.php.

dev.mysite.com is working and showing my home page, which means doc root is correct and working fine. Later pages are showing 404 because of this redirect issue. Below is my .htaccess, can someone please check and advice, where I am doing wrong?

For example, if I am trying to access dev.mysite.com/contr1/action1 I am getting 404 not found.

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteRule ^(\d{4})/(0?[1-9]|1[0-2])/([^/]+)/?$ app/$1-$2/$3 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php [L]
</IfModule>
  • 写回答

1条回答 默认 最新

  • dongpao1918 2016-03-29 16:40
    关注

    For Local Development servers you cannot use tld's like .com, .org, .net, etc. without doing additional very complex things, which I will not go into. See this well explained tutorial on setting up Virtual Hosts, hosts file, etc. in WAMP: https://john-dugan.com/wamp-vhost-setup/

    评论

报告相同问题?

悬赏问题

  • ¥15 WPF 大屏看板表格背景图片设置
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示