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

无法将我的页面重定向到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/

    评论

报告相同问题?