Forum Moderators: phranque

Message Too Old, No Replies

.htaccess + zencart + news managmente + ceon uri

.htaccess + zencart + news managmente + ceon uri

         

bunker

6:19 pm on Dec 26, 2011 (gmt 0)

10+ Year Member



Hi all,


Ive got a zencart shop online and Ive installed CEON Uri and also News & Article Managmente.

All friendly URLs are working Ok except the News and Article.

Ive got this in my .htaccess

## BEGIN CEON URI MAPPING REWRITE RULE

RewriteEngine On

# Don't rewrite any URIs ending with a file extension (ending with .[#*$!xx])
RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
# Don't rewrite any URIs for some, popular specific file format extensions,
# which are not covered by main file extension condition above
RewriteCond %{REQUEST_URI} !\.(mp3|mp4|h264)$ [NC]
# Don't rewrite any URIs for some specific file format extensions,
# which are not covered by main file extension condition above
# Uncomment the following line to apply this condition! (Remove the # at the start of the next line)
#RewriteCond %{REQUEST_URI} !\.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]
# Don't rewrite admin directory
RewriteCond %{REQUEST_URI} !^/Administraci0n [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/editors/ [NC]
# Don't rewrite cgi-bin directory
RewriteCond %{REQUEST_URI} !^/cgi-bin/ [NC]
# Don't rewrite feeds directory
RewriteCond %{REQUEST_URI} !^/feeds/ [NC]
# Don't rewrite foro directory
RewriteCond %{REQUEST_URI} !^/foro/ [NC]
# Don't rewrite _docs directory
RewriteCond %{REQUEST_URI} !^/_docs/ [NC]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* index.php [QSA,L]

## END CEON URI MAPPING REWRITE RULE

# For dreamscape's News & Articles Manager
RewriteRule ^news/?$ /index.php?main_page=news [QSA,L]
RewriteRule ^news/rss\.xml$ /index.php?main_page=news_rss [QSA,L]
RewriteRule ^news/archive/?$ /index.php?main_page=news_archive [QSA,L]
RewriteRule ^news/([0-9]{4}-[0-9]{2}-[0-9]{2})\.html$ /index.php?main_page=news&date=$1 [QSA,L]
RewriteRule ^news/archive/([0-9]{4}-[0-9]{2})\.html$ /index.php?main_page=news_archive&date=$1 [QSA,L]
RewriteRule ^news/.+-a-([0-9]+)-comments\.html$ /index.php?main_page=news_comments&article_id=$1 [QSA,L]
RewriteRule ^news/.+-a-([0-9]+)\.html$ /index.php?main_page=news_article&article_id=$1 [QSA,L]



But nothing changes for the news and managment...

Any sugestion? Ill be back!

thx in advanced!

g1smd

8:39 pm on Dec 26, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



No rules after

# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* index.php [QSA,L]


will ever be processed. The .* matches "all" requests not otherwise excluded.

Lesson 4 in .htaccess is that rule order is crucial and important.

bunker

9:47 pm on Dec 26, 2011 (gmt 0)

10+ Year Member



Hi Again,

Ok.. I saw that, then I tried the following without any result..

Ive put the rules regarding News before the line that handels the rest of index.php

## BEGIN CEON URI MAPPING REWRITE RULE

RewriteEngine On

# Don't rewrite any URIs ending with a file extension (ending with .[#*$!xx])
RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
# Don't rewrite any URIs for some, popular specific file format extensions,
# which are not covered by main file extension condition above
RewriteCond %{REQUEST_URI} !\.(mp3|mp4|h264)$ [NC]
# Don't rewrite any URIs for some specific file format extensions,
# which are not covered by main file extension condition above
# Uncomment the following line to apply this condition! (Remove the # at the start of the next line)
#RewriteCond %{REQUEST_URI} !\.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]
# Don't rewrite admin directory
RewriteCond %{REQUEST_URI} !^/CCCCC/ [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/editors/ [NC]
# Don't rewrite cgi-bin directory
RewriteCond %{REQUEST_URI} !^/cgi-bin/ [NC]
# Don't rewrite feeds directory
RewriteCond %{REQUEST_URI} !^/feeds/ [NC]
# Don't rewrite foro directory
RewriteCond %{REQUEST_URI} !^/foro/ [NC]
# Don't rewrite _docs directory
RewriteCond %{REQUEST_URI} !^/_docs/ [NC]

# For dreamscape's News & Articles Manager
RewriteRule ^news/?$ /index.php?main_page=news [QSA,L]
RewriteRule ^news/rss\.xml$ /index.php?main_page=news_rss [QSA,L]
RewriteRule ^news/archive/?$ /index.php?main_page=news_archive [QSA,L]
RewriteRule ^news/([0-9]{4}-[0-9]{2}-[0-9]{2})\.html$ /index.php?main_page=news&date=$1 [QSA,L]
RewriteRule ^news/archive/([0-9]{4}-[0-9]{2})\.html$ /index.php?main_page=news_archive&date=$1 [QSA,L]
RewriteRule ^news/.+-a-([0-9]+)-comments\.html$ /index.php?main_page=news_comments&article_id=$1 [QSA,L]
RewriteRule ^news/.+-a-([0-9]+)\.html$ /index.php?main_page=news_article&article_id=$1 [QSA,L]


# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* index.php [QSA,L]

## END CEON URI MAPPING REWRITE RULE



Thx again in advances! :)