-2

I have a problem on my datalife engine post url. In some of the my posts I get "The page isn't redirecting properly" on firefox and other browser. It seems this problem became from htaccess properties.

# Full news
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$ engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 [L]

RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 [L]
RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 [L]
RewriteRule ^([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$ engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 [L]
RewriteRule ^([^.]+)/([0-9]+)-(.*).html(/?)+$ index.php?newsid=$2&seourl=$3&seocat=$1 [L]

RewriteRule ^page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 [L]
RewriteRule ^page,([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$2&news_page=$1&seourl=$3 [L]
RewriteRule ^print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$ engine/print.php?news_page=$1&newsid=$2&seourl=$3 [L]
RewriteRule ^([0-9]+)-(.*).html(/?)+$ index.php?newsid=$1&seourl=$2 [L]

What can I do for solving this problem?

tshepang
  • 12,111
  • 21
  • 91
  • 136

3 Answers3

1

First suggestion? Consider an MVC framework to mitigate hairy .htaccess files like this.

Second suggestion, enable debugging and view the logs to track down where the redirect is occurring.

Community
  • 1
  • 1
quickshiftin
  • 66,362
  • 10
  • 68
  • 89
0

Add this rule before all these rules:

## if rewritten already
RewriteCond %{ENV:REDIRECT_STATUS} ^200$ [OR]
## If the request is for a valid directory
RewriteCond %{REQUEST_FILENAME} -d [OR]
## If the request is for a valid file
RewriteCond %{REQUEST_FILENAME} -f [OR]
## If the request is for a valid link
RewriteCond %{REQUEST_FILENAME} -l
## don't do anything
RewriteRule ^ - [L]
anubhava
  • 761,203
  • 64
  • 569
  • 643
0

Why don't you enable option "Check invalid SEO URL: Yes"?

Datalife Engine using article ID based article, so if the article ID in your database even if the "alt_name" is incorrect, DLE still can find your article regardless of your SEO URL is. the file .htaccess should be remain untouched unless you are using other mod_rewrite than apache.

Yori Smith
  • 80
  • 8
  • The problem goes from alt name when it has a invalid character like "&". Datalife security filter that url and shown loop error. I changed all urls like that and problem solved. thanks guys by the way. – user2490319 Nov 10 '13 at 05:41