在Symfony 1.4项目中更改域时发生错误

问题描述:

从某位高手处看到这一点。在Symfony 1.4项目中更改域时发生错误

我有我的symfony 1.4项目在一个领域工作完美,现在我改变了项目,因为它是到另一个域(相同,但完成在.net而不是.com)。现在主页工作,但所有其他页面或链接到同一页面的目的地显示错误“未找到页面”。奇怪的是,当我在路由前使用扩展名frontend.php或index.php时,它工作正常。 (在开发模式下所有的作品...)。

当然,我清除缓存很多次...

任何想法?为什么更改域路由停止工作?

我也改变了所有的htaccess扩展的新项目......

谢谢!

+2

声音链接的RewriteRules失踪。检查服务器配置。 – user2182349

您需要mod_rewrite的Web服务器上启用和.htaccess文件应该是这样的:

Options +FollowSymLinks +ExecCGI 

<IfModule mod_rewrite.c> 
    RewriteEngine On 

    # uncomment the following line, if you are having trouble 
    # getting no_script_name to work 
    #RewriteBase/

    # we skip all files with .something 
    #RewriteCond %{REQUEST_URI} \..+$ 
    #RewriteCond %{REQUEST_URI} !\.html$ 
    #RewriteRule .* - [L] 

    # we check if the .html version is here (caching) 
    RewriteRule ^$ index.html [QSA] 
    RewriteRule ^([^.]+)$ $1.html [QSA] 
    RewriteCond %{REQUEST_FILENAME} !-f 

    # no, so we redirect to our front web controller 
    RewriteRule ^(.*)$ index.php [QSA,L] 
</IfModule>