2013-06-28 4 views
0

나는 www.mywebsite.com이라는 웹 사이트를 가지고 있다고 가정합니다. 내 TYPO3의 V4.7 프론트 엔드는 말에서typo3 : realurl 확장 구성 문제, URL에 경로 단편을 포함하십시오.

www.mywebsite.com/cms/index.php 

에 위치하고 있으며, 백엔드는 www.mywebsite.com/cms/typo3/에 있습니다. 나는를 사용하려면

www.mywebsite.com/cms/index.php?id=45 

www.mywebsite.com/cms/something 

에 :

은 어떻게 realurl 확장은 다음과 같이 URL이 매핑되는 방식으로, 생성하는, "친숙한"URL을 구성 할 realurl의 자동 구성 기능.

<?php 
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array (
    '_DEFAULT' => 
    array (
    'init' => 
    array (
     'enableCHashCache' => true, 
     'appendMissingSlash' => 'ifNotFile,redirect', 
     'adminJumpToBackend' => true, 
     'enableUrlDecodeCache' => true, 
     'enableUrlEncodeCache' => true, 
     'emptyUrlReturnValue' => '/cms/', 
    ), 
    'pagePath' => 
    array (
     'type' => 'user', 
     'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main', 
     'spaceCharacter' => '-', 
     'languageGetVar' => 'L', 
     'rootpage_id' => '13', 
    ), 
    'fileName' => 
    array (
     'defaultToHTMLsuffixOnPrev' => 0, 
     'acceptHTMLsuffix' => 1, 
     'index' => 
     array (
     'print' => 
     array (
      'keyValues' => 
      array (
      'type' => 98, 
     ), 
     ), 
    ), 
    ), 
), 
); 
?> 

나는 그것을 끝낼 수 없습니다

이 같은 자동 구성 파일이 모습입니다. 이 웹 사이트에는 가상 호스트가 더 있습니다. 이 typ3 설치를 위해서만 새로운 전용 가상 호스트를 구축하고 싶지 않습니다.

현재 리디렉션이 작동하지 않습니다. "이 서버에서 페이지를 찾을 수 없습니다."라는 일반이 있습니다. 아파치가 발행 한 오류 메시지.

<IfModule mod_rewrite.c> 

     RewriteEngine on 
     #RewriteBase /cms/ 
     RewriteRule ^/cms/(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)(/.*)?$ - [L] 
</IfModule> 

답변

0

현재 귀하의 문제는 RealURL 및 그 구성과 관련이 없습니다. mod_rewrite 구성에 문제가 있습니다. 귀하가 게시 한 비트에 중요한 규칙이 없기 때문에 TYPO3와 함께 제공되는 원래의 것으로 시작하십시오. RewriteBase을 설정하려고 시도하지만 작동하지 않는 경우 비활성화하십시오.

실제로는 TYPO3을 호출하고 요청을 처리하게하는 마지막 규칙 (RewriteRule .* index.php [L])입니다. 이는 분명히 현재 발생하지 않습니다. 대신이 cms.mydomain.com 같은 하위 도메인에 넣어 훨씬 더 편안 하위 폴더에 TYPO3을 사용 : 그냥 팁

<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 /cms/ 

# 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> 
0

. 이 경우 추가로 다시 구성 할 필요가 없으며 모든 요소가 일반 도메인처럼 작동합니다.