Hi Jim,

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
Bookmarks