Re: Ceon URI Mapping v4.x
Hi Robin,
Glad you like the software.
Never used lighttpd before so I'm afraid I can't comment with any real effect on anything related to it at this time.
Quote:
Originally Posted by
robincornelius
So to get to the point, i'm wondering if the example regexes for the .htaccess rewrites would be better rewritten
If you are suggesting changing the example rule that the software generates, Apache doesn't need the rule to work in the way you have listed, so this must be a difference between lighttpd and Apache.
Subsequently there is no need to make any changes to the module, but thanks for your post, hopefully it's informative for any others using lighttpd.
All the best..
Conor
ceon
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
robincornelius
Hi Conor, great mod.
Got a quick question though that i've failed to find an answer for. Having some minor issues with the URI rewriting, not least of which because i'm using lightttpd and not apache. Anyway i believe i have a working solution to that which in case anyone else finds useful :-
Code:
url.rewrite-once = (
"^/(.*index.php.*|.*\.[a-z]{2,5}(\?.*)?$|editors/.*|imagezoom/.*|js/.*|feeds/.*|bmz_cache/.*|admin/.*|images/.*)" => "$1",
"^/.*(\?.*)$" => "index.php$1",
"^/.*$" => "index.php"
)
thats my first pass at getting it working, i would prefer if i could use a $HTTP["url"] =~ conditional instead of the dummy match and a rewrite-once but that did not seem to work on my first go.
Anyway in testing this i found that the page for the pay pal ipn callbacks was not working it is /ipn_main_handler.php, looking at the logs its always called with query parameters hence my slightly modified version of the regexs from your instructions.
So to get to the point, i'm wondering if the example regexes for the .htaccess rewrites would be better rewritten
RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
to
RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}(\?.*)?$ [NC]
to catch any non *.xxxxx pages other than index that get called with a query paramater. Any one see any problems with this. It should ignore product pages with SEO rewriting on even if they have a query param as they don't end in .php etc
Thanks
Robin
I also have a MOD rewrite issue as well. My client has a website installed on a Godaddy server. It is a Linux based OS and running on Apache.
I changed the mod rewrite rule to allow the .html extension on Zen Cart web pages, however I have created an actual thank you page using frontpage and the .html file extension.
When I try to load thank-you.html it automatically redirects to the home page. Do you have any suggestions on how to fix this?
Thanks.
Re: Ceon URI Mapping v4.x
Hi Edward,
When you reply to posts you shouldn't quote messages for no reason. If you do quote messages, try also to just quote relevant parts.. no point "wasting space". Just letting you know. :)
Quote:
Originally Posted by
ehswift
I changed the mod rewrite rule to allow the .html extension on Zen Cart web pages, however I have created an actual thank you page using frontpage and the .html file extension.
Why would you want a Zen Cart page to have .html?
That was a bad decision. URIs for webpages shouldn't have extensions.
Nevertheless, if you've done that now we have to deal with the problem at hand...
You've now set Zen Cart as responsible for all pages ending in .html.
Quote:
Originally Posted by
ehswift
When I try to load thank-you.html it automatically redirects to the home page. Do you have any suggestions on how to fix this?
So you need to add exclusions for every single page (URI ending in .html) that you don't want Zen Cart to handle, but to be passed through to Apache as normal.
So add conditions such as
Code:
RewriteCond %{REQUEST_URI} !thank-you\.html$ [NC]
to the rewrite rule.
If you need any further help with this please search the internet for information on rewrite rules, rewrite rule customisation is not part of the free support offered by Ceon.
Hope that helps!
All the best...
Conor
ceon
Re: Ceon URI Mapping v4.x
Hi, I installed 4.0.6 ceon uri mapping. When I open a product, or EZ-Pages, appear in the url rewritten unwanted additions.
For example, I open a product, the url is:
hardware/schede-grafiche/matrox-g200-mms? filter_id manufacturers_id = & = & = nofilter
instead of:
hardware/schede-grafiche/matrox-g200-mms.
Instead, in the EZ-Pages:
ez-pages? chapter = 0
instead of:
ez-pages.
If I post the link in the address bar without? Filter_id manufacturers_id = & = & = nofilter I get the product.
From what can be the result?
PS I'm working locally.:frusty:
Re: Ceon URI Mapping v4.x
Hi,
Quote:
Originally Posted by
Ms402
the url is:
hardware/schede-grafiche/matrox-g200-mms? filter_id manufacturers_id = & = & = nofilter
instead of:
hardware/schede-grafiche/matrox-g200-mms.
This is fine. Just ignore it.
Simple as that.
Technical explanation: Zen Cart adds these extra parameters as it needs them to pass information for particular ways of workings.
The canonical URI for the page is still /hardware/schede-grafiche/matrox-g200-mms though so that's what the search engines see.. they ignore the ? and everything after it.
All the best...
Conor
ceon
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
conor
The canonical URI for the page is still /hardware/schede-grafiche/matrox-g200-mms though so that's what the search engines see.. they ignore the ? and everything after it.
ceon
Thanks, it's a fantastic form. Congratulations!
I also solved other problems with the help of the faq.:hug:
Re: Ceon URI Mapping v4.x
Hi I have Version: 4.0.3 .I now see there are newer versions available .I've downloaded the files & there are no upgrade files ..Does this mean I have to override all the files again as a new install ...Just checking before I go ahead
Sorry if this has been mentioned before but been though a few pages & faq & can't see it listed
thanks Andy
Re: Ceon URI Mapping v4.x
Hi Andy,
Quote:
Originally Posted by
ATSWorld
Hi I have Version: 4.0.3 .I now see there are newer versions available .I've downloaded the files & there are no upgrade files ..Does this mean I have to override all the files again as a new install ...Just checking before I go ahead
Sorry if this has been mentioned before but been though a few pages & faq & can't see it listed
All you need to know is in the section of the documentation called "Upgrading". :)
Just follow the instructions there and you'll be upgraded in a few minutes.
All the best...
Conor
ceon
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
conor
That's nothing to do with Ceon URI Mapping, it's the Zen Cart setting for your store in Configuration - Missing Page Check. Set it to Page Not Found.
ceon
Hi Connor,
The store has always been configured to "Page Not Found". After installing URI Mapping though it goes to the index.
If I disable URI mapping a 404 still goes to the index. But there is a rewrite line added by URI mapping to htaccess that seems to do it. If I comment that out I get normal 404 responses.
I am assuming that a RewriteCond should be added to deal with it, but I have no idea what condition to check for
Here's the rewrite rule added by URI mapping that causes the 404's to go to the index.
Code:
## BEGIN CEON URI MAPPING REWRITE RULE
# Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
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} !^/_param [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/editors/ [NC]
# Don't rewrite jscript directory
RewriteCond %{REQUEST_URI} !^/jscript/ [NC]
# Don't rewrite zend directory
RewriteCond %{REQUEST_URI} !^/zend/ [NC]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* index.php [QSA,L]
## END CEON URI MAPPING REWRITE RULE
Re: Ceon URI Mapping v4.x
Actually I have noticed if the incorrect url entered is in the non mapped version ie
http://domain/index.php?main_page=unknown
Zen shows the "page not found" page
but if I enter a url such as
http://domain/unknown
It redirects to the index.
The problem here is all our pages are URI mapped so it is unlikely that anyone will come to the site using the non mapped url. However webmaster tools and other tracking tools don't show that a 404 error was encountered. So it is hard to track whether any problems have arisen on the site.