[英]TYPO3 pagepath doesn't work while page_id works fine
I copied a TYPO3 system from live to localhost, everything is fine except I can't open any link, I can viey the page with ?id
but not with the realpath: 我将TYPO3系统从live复制到了localhost,一切正常,除了我无法打开任何链接,我可以使用
?id
来查看页面,但不能使用realpath:
www.myweb_site.com/index.php?id=17
=> works www.myweb_site.com/index.php?id=17
=>可以
www.myweb_site.com/travelling
=> doesn't works www.myweb_site.com/travelling
=>不起作用
Things work online. 事情在网上运作。 Am I missing something ???
我错过了什么吗?
EDIT:: I ativated the rewrite in my apache2 ( sudo a2enmod rewrite
) 编辑::我着迷于我的apache2(
sudo a2enmod rewrite
)中的sudo a2enmod rewrite
My realurl extension is installed. 我的realurl扩展已安装。
And Here is my .htaccess 这是我的.htaccess
<FilesMatch "\.(js|css)$">
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 7 days"
</IfModule>
FileETag MTime Size
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
RewriteRule ^fileadmin/(.*/)?_recycler_/ - [F]
RewriteRule ^fileadmin/templates/.*(\.txt|\.ts)$ - [F]
RewriteRule ^typo3conf/ext/[^/]+/Resources/Private/ - [F]
^/TYPO3root/(typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
RewriteRule ^(typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L]
</IfModule>
With "Doesn't work" I guess you mean you get an 404 error, right? 使用“不工作”,我想您的意思是您遇到404错误,对吗? In this case there are three possibilities.
在这种情况下,存在三种可能性。
a) Your webserver does not have the module "mod_rewrite" (in case it's an apace webserver) or the equivalent on NGINX or IIS. a)您的Web服务器在NGINX或IIS上没有模块“ mod_rewrite”(如果它是apace网络服务器)或等效模块。
b) Your webserver is not configured to use mod_rewrite. b)您的网络服务器未配置为使用mod_rewrite。 TYPO3 ships with a file called .htaccess that configures mod_rewrite.
TYPO3附带一个名为.htaccess的文件,该文件用于配置mod_rewrite。 Some download tool do not download files starting with a .
某些下载工具不会下载以开头的文件。 which could be the reason this file is missing.
这可能是该文件丢失的原因。
c) Your TYPO3 installation does not use the extension realurl which translates the speaking url to index.php?id=... c)您的TYPO3安装未使用扩展名realurl,该扩展名将口语URL转换为index.php?id = ...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.