cannnot find how to add .PHP extension to CEON uri mapping
Hello,
I've looked through the FAQ's and this thread to see how to add .php to all the URI's. We are migrating to a new platform and all the files indexed with the search engine are with a .php extension.
right now:
caligirljewelry.com/bracelet
looking for:
caligirljewelry.com/bracelet.php
Sincerely,
Jim
Re: cannnot find how to add .PHP extension to CEON uri mapping
Hi Jim,
Quote:
Originally Posted by
reefdvrjim
I've looked through the FAQ's and this thread to see how to add .php to all the URI's. We are migrating to a new platform and all the files indexed with the search engine are with a .php extension.
The technology identifier should not be added to the end of the URI like that. I.e. you shouldln't end URIs in HTML or php.. URIs are locations and technology specifiers should only be used to request a particular technological output for a location.
So you should keep all your *new* URIs as /bracelet etc.
However, to stop your old links breaking you can create historical URIs to redirect from your old ones, like from /bracelet.php to /bracelet
You'll then need to adjust the rewrite rule to allow the .php extension to be handled.
This is covered in the section of the documentation "Modifying the rule to allow URI mappings to be used which end with a particular file extension (e.g. “.html”)."
Not sure how you missed that one :)
--------
For example, to allow the mapping of URIs ending in “.html”, “.htm” and “.php”, the following RewriteCond from the example rule should be changed from:
RewriteCond %{REQUEST_URI} !\.[a-zA-Z]{2,5}$
to:
RewriteCond %{REQUEST_URI} !\.[a-zA-Z]{2,5}$ [OR]
RewriteCond %{REQUEST_URI} \.(html|htm|php)$ [NC]
------------
So for you:
Code:
RewriteCond %{REQUEST_URI} !\.[a-zA-Z]{2,5}$ [OR]
RewriteCond %{REQUEST_URI} \.php$ [NC]
All the best..
Conor
ceon
Re: cannnot find how to add .PHP extension to CEON uri mapping
I don't seem to be able to get the mod to work....
I have installed as directed, and copies all the file and modified all the files as directed, installed the databse and got installation complate and all checks complete etc and passed, but when I change a URL i get a 404 error.
I have changed the htaccess file as the install pages says and tired with and without the / for index but still no joy.
contacted my host to see if there is a problem with the rewrite and they say it should work looking at the code. in the error log i get a file not found error on the URL
any ideas
Version 4.0.2 installed on 1.3.9h
Re: cannnot find how to add .PHP extension to CEON uri mapping
Hi Simon,
How are you? It's been a while!
Quote:
Originally Posted by
kitcorsa
any ideas
Version 4.0.2 installed on 1.3.9h
Everything you've described sounds like you've done all the right things so it must be a server issue.
Send me admin and FTP details and I'll take a look.
The latest version is 4.0.7 by the way, so not sure why you installed 4.0.2?
4.0.8 is just about ready for release but 4.0.2 or 4.0.7 should still have worked fine for you so I'll need to debug your actual site.
All the best..
Conor
ceon
Re: Ceon URI Mapping v4.x
i installed the older version as this was the version marked for 1.3.9 as i not upgraded yet as all my mods now compatible with the new zen-cart yet... so just sticking to want i know works.
Managed to get the rewrite to work but still a little bugged, got the URL to rewrite on the product i changed for a test but still seems to want to rewrite my admin directory as well and images dont display and CSS all gone etc, so something going on with the rewrite rule I thinks, will plud on and see if i can figure it out
Re: Ceon URI Mapping v4.x
i have now upgraded to 4.0.7
i found that all the core changes for 4.0.2 and 4.0.7 were all the same and didn't need uploading, just upload the files in the files folder.
Still can't get it to work though, installed, configed, turned on, created URL, visit page and there are no images or CSS or java, basically just text and takes about 3 mins to load. Also when visiting the admin area it forwards me to a page not found page.
checked the htaccess and i cant see anything wrong and tired severial different ways to get the rewrite rule to ignore the admin area etc but still no joy.
Re: Ceon URI Mapping v4.x
Hi Simon,
Quote:
Originally Posted by
kitcorsa
i found that all the core changes for 4.0.2 and 4.0.7 were all the same and didn't need uploading, just upload the files in the files folder.
Yes, I designed the software that way on purpose.. core changes aren't needed between versions because of the way I rewrote the software for version 4.
As for you problems.. I offered to help previously, my offer still stands. There's nothing else I can say here, nothing has changed since I last wrote.
Quote:
Originally Posted by
kitcorsa
checked the htaccess and i cant see anything wrong and tired severial different ways to get the rewrite rule to ignore the admin area etc but still no joy.
Obviously there is a serious problem with your server. It sounds like needs fixed, not Ceon URI Mapping or its rewrite rule.
All the best..
Conor
ceon
Re: Ceon URI Mapping v4.x
It should NOT be placed in a .htaccess file within the Zen Cart folder, the rewrite rule below is for the site root's .htaccess file, not Zen Cart's .htaccess file. Make sure you place it in the .htaccess file in the above folder!
what if my store is in the root, do i replace the zencart original HTaccess??
Re: Ceon URI Mapping v4.x
Hi,
Quote:
Originally Posted by
kitcorsa
what if my store is in the root, do i replace the zencart original HTaccess??
A fresh version of Zen cart doesn't have a .htaccess file in its root, there is no "original" Zen Cart .htaccess to replace.
It's probably better only ever to add the rule to an existing .htaccess file, not replace your existing .htaccess file.
Hope that helps.
All the best...
Conor
ceon
Re: Ceon URI Mapping v4.x
Conor, HELP!!
I suppose I could read through the 35 pages of posts on here, but easier and quicker I think to just post here.
I've installed the mod. It works great... Except that I'm working on a subdirectory (root directory currently houses my live site).
Here's my site: http://www.peppermaster.com/peppermaster-shop
The problem is that when the EZ pages or the product are called from the db, it's calling the root peppermaster.com db. I need it to call from the subdirectory db.
Where should I be looking for what to code this with the right addresses so I can move forward?
While I wait for what I hope is a quick response, I'll start reading the thread.
Thanks