2011-11-26 1 views
0

을 했 htaccess로 사용하지만 난 당연히 301가에 리디렉션하고 싶지 예전 .html 새, sh404sef이 일을하지, 내가 할 수있는 URL에 의해 url하지만이 경우에는 옵션이 아니에요.리디렉션/</p> <p>를 URL로 이전 끝 url.html을 변경 sh404sef를 사용, 줌라의 웹 사이트에서 작업

.htaccess를 사용하여 모든 것을 시도했지만 작동하도록 할 수는 없지만 .htaccess에 다른 것이 있는지 또는 sh404sef가이를 무시하고 있는지, 솔루션을 필요로하는지 알 수 없습니다. 여기

은 htaccess로

RewriteEngine On 

########## Begin - Rewrite rules to block out some common exploits 
## If you experience problems on your site block out the operations listed below 
## This attempts to block the most common type of exploit `attempts` to Joomla! 
# 
# Block out any script trying to set a mosConfig value through the URL 
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR] 
# Block out any script trying to base64_encode crap to send via URL 
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR] 
# Block out any script that includes a <script> tag in URL 
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] 
# Block out any script trying to set a PHP GLOBALS variable via URL 
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] 
# Block out any script trying to modify a _REQUEST variable via URL 
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) 
# Send all blocked request to homepage with 403 Forbidden error! 
RewriteRule ^(.*)$ index.php [F,L] 
# 
########## End - Rewrite rules to block out some common exploits 

# Uncomment following line if your webserver's URL 
# is not directly related to physical file paths. 
# Update Your Joomla! Directory (just/for root) 

# RewriteBase/



########## Begin - Joomla! core SEF Section 
# 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_URI} !^/index.php 
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC] 
RewriteRule (.*) index.php 
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] 
# 

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.html\ HTTP/ 
RewriteRule ^(([^/]+/)*)index\.html$ http://www.example.com/$1 [R=301,L] 

########## End - Joomla! core SEF Section 

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^([^/]+).html$ $1/ [R=301,NC] 
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.html 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ 
RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^([^/]+)/$ $1.php 
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ 
RewriteRule (.*)$ /$1 [R=301,L] 




php_flag display_errors off 
php_flag register_globals off 

php_value memory_limit 64M 

그래서 명확하게 전부입니다

그것은 지금 http://www.website.com/page/

누군가가 그들이 얻을 이전 .html 중에서 URL 년대에의 타격

입니다>http://www.website.com/page.html

했다 404와 그것은 방문자와 seo를 죽인다. htaccess에서 일반적인 명령을 모두 시도했지만 작동하지 않습니다. 이 문제를 해결하는 방법에 대한 제안이 필요합니다! 다른 규칙 전 - -

답변

0

이런 식으로 뭔가하지만 처음 덧붙여

RewriteCondition %{REQUEST_FILENAME} !-f 
RewriteRule (.*)\.html$ $1/ [R=301] 

한다 RewriteEngine

켠 후 - 서버에게 일부 서버에 500 오류가 발생할 수 있습니다 - 당신은한다 RewriteEngine에서의 여러 인스턴스를 갖고있는 것 같다.

0

나이 같은 일을 위해 :

Options +FollowSymLinks 
RewriteEngine On 

RewriteBase /yourfolderjoomla/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_URI} !^/index.php 
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC] 
RewriteRule (.*) index.php 
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] 
관련 문제