2012-11-11 31 views
0

我想在WAMP系统上使用TYPO3,但我遇到了重写URL的问题。 我已经安装了具有“入门”网站的简介包。每次我试图通过其中的一个访问网站: 本地主机/ TYPO3 本地主机/ TYPO3/index.php文件 本地主机/ TYPO3/index.php文件/ GET-开始国防部重写:链接被重写,但没有找到

的网址将成为本地主机/ TYPO3/GET-开始

这是好的,它意味着mod_rewrite已打开并正在工作。问题是我看不到网站localhost/typo3/get-started,而我有一个“找不到对象”页面。

我在同一台机器上同样的问题与Symfony的1.4,但我从来没有关心是因为Symfony的,我可以用frontend_dev.php页面访问该站点(在我的生产环境中的URL重写工作的罚款代替)。

这是TYPO3目录下的httpd.conf条目:

Alias /typo3 "C:\workspace\typo3" 
<Directory "C:\workspace\typo3"> 
Options Indexes FollowSymLinks MultiViews 
AllowOverride All 
Order allow,deny 
Allow from all 
</Directory> 

这是.htaccess文件(这已经是TYPO3包里面,我还没有修改的),我已经删除了非相关零部件

### Begin: Settings for mod_rewrite ### 

# You need rewriting, if you use a URL-Rewriting extension (RealURL, CoolUri, SimulateStatic). 

<IfModule mod_rewrite.c> 

# Enable URL rewriting 
RewriteEngine On 

# Change this path, if your TYPO3 installation is located in a subdirectory of the website root. 
#RewriteBase/

# Rule for versioned static files, configured through: 
# - $TYPO3_CONF_VARS['BE']['versionNumberInFilename'] 
# - $TYPO3_CONF_VARS['FE']['versionNumberInFilename'] 
# IMPORTANT: This rule has to be the very first RewriteCond in order to work! 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L] 

# Stop rewrite processing, if we are in the typo3/ directory. 
# For httpd.conf, use this line instead of the next one: 
# RewriteRule ^/TYPO3root/(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L] 
RewriteRule ^(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L] 

# Redirect http://example.com/typo3 to http://example.com/typo3/index_re.php and stop the rewrite processing. 
# For httpd.conf, use this line instead of the next one: 
# RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L] 
RewriteRule ^typo3$ typo3/index_re.php [L] 

# If the file/symlink/directory does not exist => Redirect to index.php. 
# For httpd.conf, you need to prefix each '%{REQUEST_FILENAME}' with '%{DOCUMENT_ROOT}'. 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 

# Main URL rewriting. 
# For httpd.conf, use this line instead of the next one: 
# RewriteRule .* /TYPO3root/index.php [L] 
RewriteRule .* index.php [L] 

</IfModule> 

### End: Settings for mod_rewrite ### 

回答

2

解决的问题是对的EasyPHP设置,因为我没有使用它的DocumentRoot(只是使用化名),改变的DocumentRoot到一个地方我把我的项目,解决它

1

.htaccess文件中所述,您应该将#RewriteBase /更改为RewriteBase /typo3/