- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我设置了一个全新的 TYPO3 4.7.5 并安装了 RealURL 1.12.3。如果我激活 RealURL,我的 URL 将不起作用,因为我得到的链接如下
http://www.domain.com/4/
http://www.domain.com/7/
我做错了什么?好像忘记了什么。
我把它放在我的主模板中
config {
baseURL = http://www.domain.com/
simulateStaticDocuments = 0
tx_realurl_enable = 1
}
此外,我启用了自动配置。
尽管如此,我还是添加了一个手动配置(typo3conf/realurl_conf.php
):
<?php
/**
*
* aeUrlTool default realurl configuration
* based on realurl-configuration of news.typo3.org
* http://news.typo3.org/about/realurl-configuration/
*
*/
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array (
'_DEFAULT' => array (
'init' => array (
'enableCHashCache' => '1',
'appendMissingSlash' => 'ifNotFile',
'enableUrlDecodeCache' => '1',
'enableUrlEncodeCache' => '1',
),
'redirects' => array (
'sitemap.xml' => 'sitemap-xml',
),
'preVars' => array (
'0' => array (
'GETvar' => 'no_cache',
'valueMap' => array (
'nc' => '1',
),
'noMatch' => 'bypass'
),
'1' => array (
'GETvar' => 'L',
'valueMap' => array (
'de' => '0',
'en' => '1',
'it' => '2',
),
'noMatch' => 'bypass',
),
'2' => array (
'GETvar' => 'lang',
'valueMap' => array (
'de' => 'de',
'en' => 'en',
'it' => 'it',
),
'noMatch' => 'bypass',
),
),
'pagePath' => array (
'type' => 'user',
'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'expireDays' => '7',
'rootpage_id' => '1',
),
'fixedPostVars' => array (
),
'postVarSets' => array (
'_DEFAULT' => array (
'archive' => array (
'0' => array (
'GETvar' => 'tx_ttnews[year]',
),
'1' => array (
'GETvar' => 'tx_ttnews[month]',
'valueMap' => array (
'january' => '01',
'february' => '02',
'march' => '03',
'april' => '04',
'may' => '05',
'june' => '06',
'july' => '07',
'august' => '08',
'september' => '09',
'october' => '10',
'november' => '11',
'december' => '12',
),
),
),
'browse' => array (
'0' => array (
'GETvar' => 'tx_ttnews[pointer]',
),
),
'select_category' => array (
'0' => array (
'GETvar' => 'tx_ttnews[cat]',
),
),
'article' => array (
'0' => array (
'GETvar' => 'tx_ttnews[tt_news]',
'lookUpTable' => array (
'table' => 'tt_news',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => '1',
'useUniqueCache_conf' => array (
'strtolower' => '1',
'spaceCharacter' => '-',
),
),
),
'1' => array (
'GETvar' => 'tx_ttnews[swords]',
),
),
),
),
'fileName' => array (
//
// if you don't want .html-URLs set the following to "false" (e.g. 'defaultToHTMLsuffixOnPrev' => false,)
// then you get http://www.yourdomain.com/imprint/ instead of http://www.yourdomain.com/imprint.html
//
'defaultToHTMLsuffixOnPrev' => true,
'index' => array (
'rss.xml' => array (
'keyValues' => array (
'type' => '100',
),
),
'rss091.xml' => array (
'keyValues' => array (
'type' => '101',
),
),
'rdf.xml' => array (
'keyValues' => array (
'type' => '102',
),
),
'atom.xml' => array (
'keyValues' => array (
'type' => '103',
),
),
),
),
),
);
?>
我的 .htaccess
看起来像
#####
#
# Example .htaccess file
#
# This file contains a collection of almost everything you will need
# for optimising TYPO3:
#
# - mod_rewrite (used for SimulateStaticDocuments, RealUrl, etc.)
# - PHP optimisation
#
# If you want to use it, you'll need to rename this file to '.htaccess'.
# (To make this work you will need to adjust the 'AllowOverride'
# directive in your Apache configuration file.)
#
# IMPORTANT: You may need to change this file depending on your TYPO3
# installation!
#
# You should change every occurance of TYPO3root/ to the location where you
# have your website in. For example:
# If you have your website located at http://mysite.com/
# then your TYPO3root/ is just empty (remove 'TYPO3root/')
# If you have your website located at http://mysite.com/some/path/
# then your TYPO3root/ is some/path/ (search and replace)
#
# If you have problems with this file, try using the minimal
# mod_rewrite.htaccess which is located in the typo3_src/misc/
# directory of this installation.
#
# You can also use this configuration in your httpd.conf, but you'll have
# to modify some lines, see the comments (search for 'httpd.conf')
#
# Using rewriting in your httpd.conf is much faster, btw.
#
# Questions about this file go to the matching Install mailing list,
# see http://typo3.org/documentation/mailing-lists/
#
####
### Begin: Rewrite stuff ###
# Enable URL rewriting
RewriteEngine On
# To assist in debugging rewriting, you could use these lines
# DON'T enable it for production!
# This will only work in httpd.conf, not in .htaccess files
#RewriteLog /var/log/apache/rewrite.log
#RewriteLogLevel 9
# If you use the RealUrl extension, then you'll have to enable the next line.
# You will have to change this path if your TYPO3 installation is located
# in a subdirectory of the website root.
#
# If you place this in httpd.conf, you cannot use this directive in any case!
#RewriteBase /
# 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/|tslib/|fileadmin/|typo3conf/|typo3temp/|uploads/|showpic\.php|favicon\.ico) - [L]
RewriteRule ^(typo3/|t3lib/|tslib/|fileadmin/|typo3conf/|typo3temp/|uploads/|showpic\.php|favicon\.ico) - [L]
# Redirect http://mysite/typo3 to http://mysite/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
# Important note: If you copy/paste this into httpd.conf instead
# of .htaccess you will need to add '%{DOCUMENT_ROOT}' left to each
# '%{REQUEST_FILENAME}' part.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# Main URL rewriting.
# If you use Windows and SimulateStaticDocuments do not work, try adding a
# slash (/) right before 'index.php' below.
# The example shows how to rewrite only *.html and *.pdf files to index.php
# This may be helpful when using an extension that can generate PDF files
# on the fly.
# Example: RewriteRule .*\.(html|pdf)$ index.php [L]
# For httpd.conf, use this line instead of the next one that has no '#':
# RewriteRule .* /TYPO3root/index.php [L]
# For use with the RealUrl extension, you might need to remove the
# RewriteBase directive somewhere above and use this line instead of the
# next one:
# RewriteRule .* /index.php [L]
RewriteRule .* index.php [L]
### End: Rewrite stuff ###
### Begin: PHP optimisation ###
# All features below are left to the default if you don't change this.
# Simply remove the comment marks if you want to use some/all of these
# settings
# The PHP developers recommend disabling this feature. Do that.
# It's deprecated and is likely to be unsupported in future versions of PHP.
#php_flag allow_call_time_pass_reference off
# TYPO3 works fine with register_globals turned off.
# This is highly recommended!
#php_flag register_globals off
# PHP may not declare the argv & argc variables (that would contain the GET
# information).
# TYPO3 doesn't need this, so just turn it off.
#php_flag register_argc_argv off
# Magic quotes for runtime-generated data (data from SQL, exec(), etc.)
#php_flag magic_quotes_gpc off
# Order in which PHP registers GET, POST, Cookie and Built-in variables
#php_value variables_order GPCS
### End: PHP optimisation ###
### Begin: Miscellaneous ###
# Make sure that directory listings are disabled
#Options -Indexes
# There is a problem with Internet Explorer and mod_gzip on Apache servers.
# For more information, see
# http://typo3.org/documentation/document-library/rtehtmlarea/Tutorial-79/
#mod_gzip_item_exclude file \.css$
#mod_gzip_item_exclude file \.png$
#mod_gzip_item_exclude file \.gif$
#mod_gzip_item_exclude file \.jpg$
#mod_gzip_item_exclude file \.jpeg$
#mod_gzip_item_exclude file \.js$
### End: Miscellaneous ###
# Add your own rules here
# ...
最佳答案
您需要在树的根目录中创建域记录。
然后:
结合自动配置,它应该可以正常工作盒子。
或者,如果您想手动创建它,则需要在该文件 (typo3conf/realurl.conf) 末尾添加 realurl conf 中的以下行:
$TYPO3_CONF_VARS['EXTCONF']['realurl']['example.com'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
unset($TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']);
如果您使用手动 realurl 配置,请仔细检查 realurl 扩展管理器是否为手动配置读取了正确的文件。看这里:
关于typo3 - RealURL 给我 http ://www. domain.com/4/links,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13054695/
我遇到了搜索引擎优化问题,用户可以通过指定任何子域访问我的站点。这会导致 SEO 出现重复页面问题。 例如,如果用户错误输入“www”然后在论坛上发布了一个链接,则谷歌正在抓取“wwww.domain
这个问题在这里已经有了答案: 关闭10 年前。 Possible Duplicates: Can I change all my links to just //? Network-Path Ref
我正在玩 lighttpd在小型虚拟专用服务器上。我两个域指向服务器。我在 Ubuntu 8.10 上使用最新版本的 lighttpd 和 mod_evhost。 我正在尝试设置一个规则,这样如果任何
我正在开发一个由 domain.ext 提供的网络应用程序。此 Web 应用程序使用基于 cookie 的 session ,并为用户提供在子域上托管包含自定义 JavaScript 的网页的能力,例
我想重定向: 情况一、example.com到subdomain.example.com 情况2.www.example.com到subdomain.example.com 我已将这两段代码放入我的
我遇到了“领域对象”这个术语,并在 Google 上找到了几个定义,但我只是想验证我的理解是否正确。 这是否只是表示业务规则的任何类 - 因为“域”一词通常表示特定于某些本地问题集的规则,例如如何计算
将我们的应用程序静态内容托管在一个完全不同的域上而不是像其他域一样托管在我们主域的子域上有什么好处吗?例如微软使用 i.microsoft.com,谷歌使用 gstatic.com,雅虎使用 yimg
Orbited的客户端JS组件( cometd 服务器),要求如果服务器运行在与 JS 本身不同的域或端口上,则必须执行 document.domain = document.domain; 在加载任
我通读了另一篇文章,但似乎没有人回答我一直遇到的问题。是否可以使用通配符域的通配符子域(即使它仅用于子域而不是子子域),例如:foo.example.local。 我已经有 example.local
我在 Google Domains 上有一个域名,我想指向我在家里的 raspberry pi 服务器上运行的网站。我的公共(public) IP 地址是动态的,当 IP 更新时,我无法弄清楚如何保持
我有这个经典的 DDD 问题;我有一个做一些事情的域服务“DetectPriority”。 PM 要求我创建 2 个不同的服务;一个 INTERNAL(包含完整的业务规则并涉及许多其他领域模型)和另一
An interesting thread我刚才输入这个问题时就出现了。但我认为它没有回答我的问题。 我一直在使用 .NET MVC3 进行大量工作,因此需要一个贫乏的模型。 View 模型和编辑模型
我正在通过docker-compose运行最新版本的Artifactory OSS(如here和here所述)。我的docker-compose文件看起来像这样: version: '2' servi
我正在阅读 MDC entry for nsICookieManager2.add它讨论了域和非域 cookie。这两种类型的 cookie 有什么区别? 最佳答案 来自 RFC2109: Host
这是我的问题:http://regexr.com?2temn 我相信对于你们中的一些正则表达式大师来说这很简单。 干杯! 最佳答案 这也有效: (?<=\.|)\w+\.\w+$ 仅使用 PHP 进行
这应该很简单,但我无法理解。有许多好的和坏的正则表达式方法来匹配 URL,有或没有协议(protocol),有或没有 www。我遇到的问题是这个(在 javascript 中):如果我使用正则表达式来
我有一个网站 http://mywebsite.tld ,我想将 www.mywebsite.tld 重定向到 http://mywesite.tld (所以 www=>非 www) (防止重复内容)
TL;DR 我应该从 www.domain.tld 重定向到 domain.tld 还是相反? 我正在运行一个处理多个域的 CMS。到目前为止,CMS 负责将 www.domain.tld 重定向到
我目前有以下代码: string user = @"DOMAIN\USER"; string[] parts = user.Split(new string[] { "\\" }, StringSpl
使用 Go 和 AWS-SDK 我正在尝试查询 AWS 控制台中 Route53 -> Hosted Zones 下列出的 route53 CNAME 和 A 记录。我可以使用以下代码进行查询,但它需
我是一名优秀的程序员,十分优秀!