Re: Re: New website url's | FU or not | 301 redirect
Marco van den Oever <[email protected]>
| Newsgroups | gmane.comp.cms.farcry.devel |
|---|---|
| Message-ID | <[email protected]> |
The home navigation has "/" as fu, the page under home has "/home". Did
send it to draft and approved but same result, /home is displaying but
www.domainname.com shows "page not found".
I didn't changed the webskin or core, here's the code of the execute
webskin of ruleLinks, I placed the link through a ruleLinks rule:
<cfsetting enablecfoutputonly="true" />
<!--- @@Copyright: Daemon Pty Limited 2002-2008, http://www.daemon.com.au
--->
<!--- @@License:
This file is part of FarCry CMS Plugin.
FarCry CMS Plugin is free software: you can redistribute it and/or
modify
it under the terms of the GNU Lesser General Public License as
published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FarCry CMS Plugin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with FarCry CMS Plugin. If not, see
<http://www.gnu.org/licenses/>.
--->
<!--- @@displayname: ruleLinks execute --->
<cfimport taglib="/farcry/core/tags/webskin" prefix="skin" />
<cfparam name="request.mode.lValidStatus" default="approved">
<!--- If Archive: Get Maximum Rows in New Table --->
<cfif stObj.bArchive>
<cfquery datasource="#arguments.dsn#" name="qCount">
SELECT count(objectID) as total
FROM #application.dbowner#dmLink
</cfquery>
<cfset maximumRows = qCount.total>
<cfelse>
<cfset maximumRows = stObj.numItems>
</cfif>
<!--- check if filtering by categories --->
<cfif len(trim(stobj.metadata))>
<cfset oCat = createObject("component",
"farcry.core.packages.types.category") />
<cfset q = oCat.getDataQuery(lCategoryIDs="#stObj.metadata#"
,typename="dmLink"
,maxRows="#maximumRows#"
,bMatchAll="#stobj.bMatchAllKeywords#"
,sqlWhere=""
,sqlOrderBy="title asc"
) />
<cfelse>
<!--- don't filter on categories --->
<cfquery datasource="#arguments.dsn#" name="q" maxrows="#maximumRows#">
SELECT objectid
FROM #application.dbowner#dmLink
WHERE status IN
('#ListChangeDelims(request.mode.lValidStatus,"','",",")#')
ORDER BY title asc
</cfquery>
</cfif>
<cfif len(trim(stObj.intro)) AND q.recordCount>
<cfoutput>#stObj.intro#</cfoutput>
</cfif>
<cfif stObj.bArchive>
<!--- THIS MEANS PAGINATE --->
<skin:pagination query="#q#" typename="dmLink" paginationID="ruleLinks"
recordsPerPage="30" pageLinks="10" r_stobject="st">
<skin:view objectid="#st.objectid#" typename="dmLink" webskin=
"#stObj.displaymethod#" />
</skin:pagination>
<cfelse>
<cfloop query="q">
<skin:view objectid="#st.objectid#" typename="dmLink" webskin=
"#stObj.displaymethod#" />
</cfloop>
</cfif>
<cfif len(trim(stObj.suffix)) AND q.recordCount>
<cfoutput>#stObj.suffix#</cfoutput>
</cfif>
<cfsetting enablecfoutputonly="false" />
Here's the webskin/pagination:
<cfsetting enablecfoutputonly="true">
<!--- @@Copyright: Daemon Pty Limited 1995-2007, http://www.daemon.com.au
--->
<!--- @@License:
This file is part of FarCry.
FarCry is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FarCry is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FarCry. If not, see <http://www.gnu.org/licenses/>.
--->
<!--- @@displayname: Pagination --->
<!--- @@description: Provides the functionality to paginate through a
recordset --->
<!--- @@author: Matthew Bryant ([email protected]) --->
<!------------------
FARCRY IMPORT FILES
------------------>
<cfimport taglib="/farcry/core/tags/formtools" prefix="ft" />
<cfimport taglib="/farcry/core/tags/webskin" prefix="skin" />
<!------------------
START WEBSKIN
------------------>
<cfif thistag.executionMode eq "Start">
<!--- OPTIONAL ATTRIBUTES --->
<cfparam name="attributes.query" default="" /><!--- A query name that
contains the objectids to loop over. --->
<cfparam name="attributes.array" default="" /><!--- An array of
objectids to loop over. Can be used instead of query. --->
<cfparam name="attributes.typename" default="" />
<cfparam name="attributes.paginationID" default="fcPagination" /><!---
Uniquely identifies this pagination set. Set if using sticky pages or if
multiple pagination sets on a single page. --->
<cfparam name="attributes.bStickyPages" default="false" /><!--- Keeps
track of the page the user is currently on in session against this key. --->
<cfparam name="attributes.currentPage" default="0" />
<cfparam name="attributes.actionURL" default="" />
<cfparam name="attributes.r_stObject" default="stObject" /><!--- The
name of the calling page structure that will contain the current row of the
recordset as struct --->
<cfparam name="attributes.totalRecords" default="0" /><!--- The total
number of records in the records. Used if only the current page of the
recordset was passed in. 0 assumes that the recordset passed in is the
entire recordset to be paginated. --->
<cfparam name="attributes.maxRecordsToDisplay" default="0" type=
"numeric">
<cfparam name="attributes.pageLinks" default="10" type="numeric">
<cfparam name="attributes.recordsPerPage" default="10" type="numeric">
<cfparam name="attributes.submissionType" default="url" type="string">
<cfparam name="attributes.Step" default="1" type="numeric">
<cfparam name="attributes.top" default="true" type="boolean">
<cfparam name="attributes.bottom" default="true" type="boolean">
<cfparam name="attributes.oddRowClass" default="oddrow" type="string"><!---
The class name returned in stobjects for each "even" current row --->
<cfparam name="attributes.evenRowClass" default="evenrow" type="string"><!---
The class name returned in stobjects for each "odd" current row --->
<cfparam name="attributes.bDisplayTotalRecords" default="0" /><!---
display the total records or not --->
<cfparam name="attributes.linksWebskin" default="displayLinks" /><!---
webskin to use for rendering the pagination scroll --->
<cfparam name="attributes.r_pageLinksHtml" default="" type="string" /><!---
Save page links html to a variable so we can return it to the caller --->
<!------------------------------------------------------------------------------------
Check if they have passed in the attribute as the NAME of a
query/array in the caller.
IF SO, change it to the reference to the calling query/array.
------------------------------------------------------------------------------------>
<cfif isSimpleValue(attributes.query) AND len(attributes.query)>
<cfif structKeyExists(caller, attributes.query)>
<cfset attributes.query = caller[attributes.query] />
</cfif>
</cfif>
<cfif isSimpleValue(attributes.array) AND len(attributes.array)>
<cfif structKeyExists(caller, attributes.array)>
<cfset attributes.array = caller[attributes.array] />
</cfif>
</cfif>
<!--- INITIALISE THE PAGINATION OBJECT WITH ALL THE REQUIRED VALUES
BASED ON THE ATTRIBUTES PASSED INTO THIS TAG. --->
<cfset oPagination = application.fapi.getContentType("farPagination").
setup(argumentCollection="#attributes#") />
<!--- THIS HIDDEN FIELD WILL STORE THE PAGE REQUESTED IF PAGINATING
USING A FORM POST --->
<cfif attributes.submissionType eq "form">
<skin:loadJS id="jquery" />
<skin:loadJS id="farcry-form" />
<skin:htmlHead id="pageSubmitJS">
<cfoutput>
<script type="text/javascript">
farcryps = function(page,formname,type,actionURL){
if(type=='form'){
btnSubmit(formname, ''); //submit farcryform but ensure no
actions are taken.
return false;
} else if(type=='url'){
window.location = actionURL + '&page=' + page;
return false;
} else {
return true;
}
}
</script>
</cfoutput>
</skin:htmlHead>
<cfoutput>
<input type="hidden" name=
"paginationpage#attributes.paginationID#" id=
"paginationpage#Request.farcryForm.Name#" value="" />
</cfoutput>
</cfif>
<cfif len(attributes.r_pageLinksHtml)>
<!--- Save page links html to a variable so we can return it to the
caller --->
<cfset pageLinksHtml =
oPagination.getView(template="#attributes.linksWebskin#", position="top" )
/>
<cfset caller[attributes.r_pageLinksHtml] = pageLinksHtml />
</cfif>
<!--- Render the pagination at the top --->
<cfif attributes.top>
<cfset topPagination =
oPagination.getView(template="#attributes.linksWebskin#", position="top",
stparam=attributes ) />
<cfoutput>#topPagination#</cfoutput>
</cfif>
<!--- CHECK TO ENSURE THERE ARE ACTUALLY RECORDS TO LOOP THROUGH --->
<cfif oPagination.getCurrentRow() LTE oPagination.getRecordTo()>
<cfset currentRow = 1 />
<cfset recordCount = oPagination.getRecordTo() - oPagination.
getCurrentRow() + 1 />
<cfset recordsetRow = oPagination.getCurrentRow() />
<cfset recordsetCount = oPagination.getTotalRecords() />
<cfset caller[attributes.r_stObject] =
oPagination.getNextRowAsStruct() />
<cfset caller[attributes.r_stObject].currentRow = currentRow />
<cfset caller[attributes.r_stObject].recordCount = recordCount />
<cfset caller[attributes.r_stObject].recordsetRow = recordsetRow />
<cfset caller[attributes.r_stObject].recordsetCount = recordsetCount
/>
<cfif currentRow mod 2>
<cfset caller[attributes.r_stObject].currentRowClass =
attributes.oddRowClass />
<cfelse>
<cfset caller[attributes.r_stObject].currentRowClass =
attributes.evenRowClass />
</cfif>
<cfif currentRow EQ 1>
<cfset caller[attributes.r_stObject].bFirst = true />
<cfelse>
<cfset caller[attributes.r_stObject].bFirst = false />
</cfif>
<cfif currentRow EQ recordCount>
<cfset caller[attributes.r_stObject].bLast = true />
<cfelse>
<cfset caller[attributes.r_stObject].bLast = false />
</cfif>
<cfelse>
<!--- MEANS THERE WERE NO RECORDS SO SIMPLY CALL THE BOTTOM --->
<cfif attributes.bottom>
<cfset bottomPagination =
oPagination.getView(template="#attributes.linksWebskin#", position="bottom",
stparam=attributes ) />
<cfoutput>#bottomPagination#</cfoutput>
</cfif>
<cfexit method="exittag" />
</cfif>
</cfif>
<cfif thistag.executionMode eq "End">
<!--- Check to see if we still have more rows to process --->
<cfif oPagination.getCurrentRow() LTE oPagination.getRecordTo()>
<cfset currentRow = currentRow + 1 />
<cfset recordsetRow = oPagination.getCurrentRow() />
<cfset caller[attributes.r_stObject] =
oPagination.getNextRowAsStruct() />
<cfset caller[attributes.r_stObject].currentRow = currentRow />
<cfset caller[attributes.r_stObject].recordCount = recordCount />
<cfset caller[attributes.r_stObject].recordsetRow = recordsetRow />
<cfset caller[attributes.r_stObject].recordsetCount = recordsetCount
/>
<cfif currentRow mod 2>
<cfset caller[attributes.r_stObject].currentRowClass =
attributes.oddRowClass />
<cfelse>
<cfset caller[attributes.r_stObject].currentRowClass =
attributes.evenRowClass />
</cfif>
<cfif currentRow EQ 1>
<cfset caller[attributes.r_stObject].bFirst = true />
<cfelse>
<cfset caller[attributes.r_stObject].bFirst = false />
</cfif>
<cfif currentRow EQ recordCount>
<cfset caller[attributes.r_stObject].bLast = true />
<cfelse>
<cfset caller[attributes.r_stObject].bLast = false />
</cfif>
<cfsetting enablecfoutputonly="false" />
<cfexit method="loop" />
<cfelse>
<!--- After the last record, we render the pagination. --->
<cfif attributes.bottom>
<cfset bottomPagination =
oPagination.getView(template="#attributes.linksWebskin#", position="bottom",
stparam=attributes) />
<cfoutput>#bottomPagination#</cfoutput>
</cfif>
</cfif>
</cfif>
<cfsetting enablecfoutputonly="false">
and the farPagination:
<cfsetting enablecfoutputonly="true">
<!--- @@Copyright: Daemon Pty Limited 1995-2007, http://www.daemon.com.au
--->
<!--- @@License: Released Under the "Common Public License 1.0",
http://www.opensource.org/licenses/cpl.php --->
<!--- @@displayname: Displays the Pagination Links --->
<!--- @@description: --->
<!--- @@author: Matthew Bryant ([email protected]) --->
<!---------------------------------------------
AVAILABLE INFORMATION
------------------------------------------------>
<!---
getQuery() Get the start page of the pagination loop
getTotalRecords() Return the number of records in the entire pagination
set
getPageFrom() Get the start page of the pagination loop
getPageTo() Get the end page of the pagination loop
getCurrentPage() Get the current page
getTotalPages() Get the total number of pages
getFirstPage() Get the first page in the pagination loop
getLastPage() Get the last page in the pagination loop
getRecordFrom() Get the first row of the recordset for the current page
of the pagination.
getRecordTo() Get the last row of the recordset for the current
page of the pagination.
getCurrentRow() Get the current row of the recordset for the current
page of the pagination.
--->
<!------------------
FARCRY IMPORT FILES
------------------>
<cfimport taglib="/farcry/core/tags/webskin" prefix="skin" />
<cfimport taglib="/farcry/core/tags/admin" prefix="admin" />
<!------------------
START WEBSKIN
------------------>
<!--- INCLUDE THE CSS IN THE HEADER --->
<skin:loadCSS id="farcry-pagination" />
<cfparam name="arguments.stParam.bDisplayTotalRecords" default="0">
<!--- OUTPUT THE MARKUP FOR THE PAGINATOR --->
<cfif getPageTo() GT 1>
<cfoutput>
<div class="paginator-wrap">
<div class="paginator">
#renderLink(linkid="first",
linktext=application.fapi.getResource('coapi.farPagination.first@label','begin'))#
#renderLink(linkid="previous",
linktext=application.fapi.getResource('coapi.farPagination.previous@label','<
vorige'))#
<cfloop from="#getPageFrom()#" to="#getPageTo()#" index="i">
#renderLink(linkid=i)#
</cfloop>
#renderLink(linkid="next",
linkText=application.fapi.getResource('coapi.farPagination.next@label',"volgende
>"))#
#renderLink(linkid="last",
linkText=application.fapi.getResource('coapi.farPagination.last@label',"eind"))#
<cfif arguments.stParam.bDisplayTotalRecords>
<span class="resultCount"><admin:resource key=
"coapi.farPagination.displaying@html" var1="#getRecordFrom()#" var2=
"#getRecordTo()#" var3="#getTotalRecords()#">Getoond <span class=
"numberCount">{1}</span> - <span class="numberCount">{2}</span> van <span
class="numberCount">{3}</span> resultaten</admin:resource></span>
</cfif>
</div>
</div>
</cfoutput>
</cfif>
<cfsetting enablecfoutputonly="false">
The urls are being generated i guess by farcry and apache, don't know of
any other way they are generated.
Maybe i should upgrade farcry core, now using 6.2.7
Op dinsdag 19 maart 2013 21:24:31 UTC+1 schreef Justin Carter het volgende:
>
> 1. Check the SEO tab on the home dmNavigation node in the tree. If it
> doesn't have an FU then try sending it to draft and then approving it again.
>
> 2. Are you using the core versions of the pagination tag and webskin, or
> have you customised them? Internally they should be using the fixURL
> function which doesn't generate duplicate URL variables. Does it only
> happen when a category filter is also in the URL, not just pagination by
> itself?
>
> 3. How are the links to the links page and chat page generated? It seems
> like URL variables are being appended somehow (furl is in the URL scope due
> to the rewrite in Apache, but it should never end up in a generated URL).
> On 20/03/2013 2:35 AM, "Marco van den Oever" <[email protected]<javascript:>>
> wrote:
>
>> Ehhh almost nice :) I am encountering some problems, if anyone has any
>> clues, please help :)
>>
>> =======
>>
>> When I put in my domainname I get an error "page not found",
>> domainname/home works.
>>
>>
>> When I go to my pages which uses pagination the screen flickers and I
>> can't click on any link, also the pagination doesn't
>> seem to work correctly, this is only when the pagination is using fu's,
>> when I go to the pagination of the search results page
>> (which is not using fu's yet) this problem isn't there.
>>
>> For instance When i click on a pagination page number I get:
>>
>> http://www.aquariusagenieuw.com/categorieen/pageruleNews/2
>>
>> or
>>
>>
>> http://www.aquariusagenieuw.com/categorieen/pageruleNews/categorieen/pageruleNews/categorieen/pageruleNews/2/pageruleNews/categorieen/pageruleNews/10/pageruleNews/categorieen/pageruleNews/2/pageruleNews/5
>>
>> but the page shows the first result set.
>>
>>
>> When I click my links page url I get:
>>
>> http://www.aquariusagenieuw.com/links/?furl=links
>>
>> why is the ?furl=links apearing?
>>
>> Also when clicking on my links pagination page numers I end up with
>> strange URL's like:
>>
>>
>> http://www.aquariusagenieuw.com/links/links/links/pageruleLinks/links/links/links/pageruleLinks/3
>>
>> each click is adding more to the link.
>>
>>
>> When I click my /chat url I get:
>>
>> http://www.aquariusagenieuw.com/chat/?furl=chat
>>
>> so why here a ?furl=chat while other navigation is correctly set?
>>
>> =======
>>
>> Any idea's?
>>
>> Op dinsdag 19 maart 2013 00:33:37 UTC+1 schreef Justin Carter het
>> volgende:
>>>
>>> Nice :)
>>> On 19/03/2013 10:26 AM, "Marco van den Oever" <[email protected]>
>>> wrote:
>>>
>>>> Ahhh now I am getting happy :) Seems it's working now, thanks both
>>>> again!
>>>>
>>>> Op maandag 18 maart 2013 23:51:59 UTC+1 schreef Justin Carter het
>>>> volgende:
>>>>>
>>>>> Ok, getting closer :)
>>>>>
>>>>> The friendly URLs might not have been generated correctly on your
>>>>> navigation nodes while you didn't have friendly URLs enabled... Try Admin
>>>>> -> Developer Utilities -> Rebuild Friendly URLs. And then an updateapp for
>>>>> good measure.
>>>>>
>>>>> cheers,
>>>>> Justin
>>>>>
>>>>>
>>>>> On Tue, Mar 19, 2013 at 9:48 AM, Marco van den Oever <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Ok I did forced fu's on, now i have for the agenda page:
>>>>>> http://www.aquariusagenieuw.**co**m/2AAA0320-8355-11E2-**A97E50465**
>>>>>> D06EA7A<http://www.aquariusagenieuw.com/2AAA0320-8355-11E2-A97E50465D06EA7A>
>>>>>> And not http://www.aquariusagenieuw.**co**m/agenda/agenda<http://www.aquariusagenieuw.com/agenda/agenda>
>>>>>>
>>>>>> Op maandag 18 maart 2013 22:23:34 UTC+1 schreef Chris Kent het
>>>>>> volgende:
>>>>>>
>>>>>>> Also, worth doing an updateapp to rebuild-site to flush out any
>>>>>>> cached webskins after making changes that Justin has suggested to force
>>>>>>> switching on the FU's
>>>>>>>
>>>>>>> On Monday, 18 March 2013 21:15:53 UTC, Justin Carter wrote:
>>>>>>>>
>>>>>>>> If hitting /agenda/agenda works then your Apache rewrite is working
>>>>>>>> :)
>>>>>>>>
>>>>>>>> If FarCry isn't generating friendly URLs with skin:genericnav or
>>>>>>>> fapi.getLink() then you'll need to force friendly URLs to turn on. See the
>>>>>>>> link I posted in a previous message, in the troubleshooting section at the
>>>>>>>> bottom of that wiki page there are instructions how to do it :)
>>>>>>>> On 19/03/2013 8:00 AM, "Marco van den Oever" <[email protected]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> For example I have a URL for the Agenda page:
>>>>>>>>> index.cfm?objectid=2AAA0320-**83****55-11E2-A97E50465D06EA7A
>>>>>>>>> it is not rewritten into /agenda/agenda
>>>>>>>>>
>>>>>>>>> I have used the wiki example code and the rewriting on the server
>>>>>>>>> is on
>>>>>>>>>
>>>>>>>>> when I try the URL /agenda/agenda it does work
>>>>>>>>> When I try the pingFU test it says page not found.
>>>>>>>>>
>>>>>>>>> Op zondag 17 maart 2013 22:22:18 UTC+1 schreef Justin Carter het
>>>>>>>>> volgende:
>>>>>>>>>>
>>>>>>>>>> Your hosts file entry won't have any effect on the rewrite
>>>>>>>>>> working or not working - if you can browse to the site at all then your
>>>>>>>>>> hosts file is fine. Hosts file entries simply show your PC look look up the
>>>>>>>>>> IP address of a host name, out doesn't do any "redirection".
>>>>>>>>>>
>>>>>>>>>> Can you paste some example URLs that work, and some that don't?
>>>>>>>>>> It doesn't matter that I won't be able to browse to them, I just need to
>>>>>>>>>> see the examples to work out what is going on.
>>>>>>>>>>
>>>>>>>>>> Cheers,
>>>>>>>>>> Justin
>>>>>>>>>> On 18/03/2013 7:50 AM, "Marco van den Oever" <
>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>
>>>>>>>>>>> Thanks Justin, updateapp had no effect, but when adding pingFU
>>>>>>>>>>> like www.xxxxxxx.com/pingFU it gives me a page not found.....
>>>>>>>>>>> Has it to do that i am viewing the site using a windows hosts
>>>>>>>>>>> file redirection to view the website?
>>>>>>>>>>>
>>>>>>>>>>> Op zondag 17 maart 2013 21:22:28 UTC+1 schreef Justin Carter het
>>>>>>>>>>> volgende:
>>>>>>>>>>>>
>>>>>>>>>>>> Did you updateapp after putting the rewrite in place? If that
>>>>>>>>>>>> still doesn't work, you can force the friendly URLs to always turn on, look
>>>>>>>>>>>> in the troubleshooting section at the bottom of this page where it talks
>>>>>>>>>>>> about testing with pingfu: https://farcry.jira.com/wiki/**d****
>>>>>>>>>>>> ****isplay/FCDEV50/Friendly+URLs<https://farcry.jira.com/wiki/display/FCDEV50/Friendly+URLs>
>>>>>>>>>>>>
>>>>>>>>>>>> Cheers,
>>>>>>>>>>>> Justin
>>>>>>>>>>>> On 18/03/2013 7:09 AM, "Marco van den Oever" <
>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Then again.... the simple rewrite was working out so why does
>>>>>>>>>>>>> the rewrite from the wiki not? Guess i still need some help....
>>>>>>>>>>>>>
>>>>>>>>>>>>> Op zondag 17 maart 2013 21:07:08 UTC+1 schreef Marco van den
>>>>>>>>>>>>> Oever het volgende:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Mmm testing the fu's by manually entering the fu is correctly
>>>>>>>>>>>>>> displaying the fu, so assume i have to check my host for the rewrite
>>>>>>>>>>>>>> issue...
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Op zondag 17 maart 2013 17:37:21 UTC+1 schreef Marco van den
>>>>>>>>>>>>>> Oever het volgende:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> So a little update.... My host have tested the rewrite and
>>>>>>>>>>>>>>> this rewrite is going fine:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> ##### APACHE MOD_REWRITE SYNTAX
>>>>>>>>>>>>>>> RewriteEngine On
>>>>>>>>>>>>>>> RewriteRule ^testpage\.html$ welcome.html
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> When testing this rewrite myself, code from wiki:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> ##### APACHE MOD_REWRITE SYNTAX
>>>>>>>>>>>>>>> RewriteEngine On
>>>>>>>>>>>>>>> RewriteCond %{REQUEST_URI} !(^/farcry|^/webtop|^/flex2gat***
>>>>>>>>>>>>>>> *********eway|^/flashservices|^/CFIDE)(************$|/)
>>>>>>>>>>>>>>> RewriteRule ^([a-zA-Z0-9\/\-\%:\[\]\{\}\|\************;\<\>\?\,\*\!\@\#\$\
>>>>>>>>>>>>>>> \(\)\^_`~]*)$ /index.cfm?furl=$1 [L,PT,QSA]
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> It's not working although I have various pages set with fu's.
>>>>>>>>>>>>>>> Also I notice that the full domain www.mytestsite.com is
>>>>>>>>>>>>>>> giving a "page not found".
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I am using a domain that is locally set in my windows hosts
>>>>>>>>>>>>>>> file.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Any idea's?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Op vrijdag 15 maart 2013 22:56:37 UTC+1 schreef Marco van
>>>>>>>>>>>>>>> den Oever het volgende:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> That seems not to hard at all :) I'll go and set it up,
>>>>>>>>>>>>>>>> thanks!
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Op vrijdag 15 maart 2013 22:36:20 UTC+1 schreef Justin
>>>>>>>>>>>>>>>> Carter het volgende:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Oh and in this case your objectid to pass in to getLink()
>>>>>>>>>>>>>>>>> will be newsitem.objectid
>>>>>>>>>>>>>>>>> On 16/03/2013 8:26 AM, "Marco van den Oever" <
>>>>>>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Ok awesome that works great on the 301 redirection :)
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> So what you are saying about application.fapi.getLink(),
>>>>>>>>>>>>>>>>>> in fact I can use FU's? Like:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> <cflocation url="#application.fapi.**getLink**********
>>>>>>>>>>>>>>>>>> (objectid=categorie)#" statuscode="301" addtoken="false">
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> I have tried this and it's sending me to
>>>>>>>>>>>>>>>>>> index.cfm?objectid=XXXXXXXXX
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> I do have created a FU for it.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Guess I still don't understand how to run FU's, got to
>>>>>>>>>>>>>>>>>> check some config setting somewhere like use the FU's? Or still also need
>>>>>>>>>>>>>>>>>> Apache to rewrite?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Thanks.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Op vrijdag 15 maart 2013 21:25:29 UTC+1 schreef Justin
>>>>>>>>>>>>>>>>>> Carter het volgende:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> The easiest way to see the 301 is to use the Network tab
>>>>>>>>>>>>>>>>>>> in Firebug / Chrome Web Inspector. Turn on "persist", clear the log, hit
>>>>>>>>>>>>>>>>>>> the URL that you're testing, and at the top of the list you should see a
>>>>>>>>>>>>>>>>>>> 301 for the old URL followed by a 200 for the URL that it redirected to.
>>>>>>>>>>>>>>>>>>> (Remember to turn off persist again also)
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> BTW, if your site is using friendly URLs then instead of
>>>>>>>>>>>>>>>>>>> redirecting to index.cfm with an objectid, you could call
>>>>>>>>>>>>>>>>>>> application.fapi.getLink() which will return the friendly URL.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Cheers,
>>>>>>>>>>>>>>>>>>> Justin
>>>>>>>>>>>>>>>>>>> On 16/03/2013 12:45 AM, "Marco van den Oever" <
>>>>>>>>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> In addition.... I have tried, without success, several
>>>>>>>>>>>>>>>>>>>> things to check if the headers are set correctly with 301 code, how do you
>>>>>>>>>>>>>>>>>>>> check that?
>>>>>>>>>>>>>>>>>>>> With this code I have tried a cgi dump to check te
>>>>>>>>>>>>>>>>>>>> referrer etc, but can't see any 301 header info, is that even possible
>>>>>>>>>>>>>>>>>>>> after a cflocation?
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Op vrijdag 15 maart 2013 14:43:07 UTC+1 schreef Marco
>>>>>>>>>>>>>>>>>>>> van den Oever het volgende:
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> I guess Justin his answer pretty much covered this
>>>>>>>>>>>>>>>>>>>>> 'problem', it's not working as my old URL contains "." in it.
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> So I have chosen not to use Apache for rewriting as I
>>>>>>>>>>>>>>>>>>>>> have no experience with it and have read here and there that you really
>>>>>>>>>>>>>>>>>>>>> should know what you are doing with it, no time to study!
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Just to be sure, I am very scared of using new URLs,
>>>>>>>>>>>>>>>>>>>>> this is my code:
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> <!--- redirect old url's to new ones --->
>>>>>>>>>>>>>>>>>>>>> <cfif isdefined('url.newsid')>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> <!--- get related news item --->
>>>>>>>>>>>>>>>>>>>>> <cfquery name="newsitem" datasource="aquariusagenieuw"
>>>>>>>>>>>>>>>>>>>>> >
>>>>>>>>>>>>>>>>>>>>> SELECT ObjectID FROM dmnews
>>>>>>>>>>>>>>>>>>>>> WHERE oldid = <cfqueryparam cfsqltype="cf_sql_varchar"
>>>>>>>>>>>>>>>>>>>>> value="#url.newsid#">
>>>>>>>>>>>>>>>>>>>>> </cfquery>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> <!--- go to new url --->
>>>>>>>>>>>>>>>>>>>>> <cflocation url="index.cfm?objectid=#**newsi**********
>>>>>>>>>>>>>>>>>>>>> ****tem.ObjectID#" statuscode="301" addtoken="false">
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> </cfif>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Is this satisfying google and other search engines
>>>>>>>>>>>>>>>>>>>>> rules?
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Op vrijdag 8 maart 2013 14:38:37 UTC+1 schreef Marco
>>>>>>>>>>>>>>>>>>>>> van den Oever het volgende:
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> I am testing to use the Farcry FU's, have created a
>>>>>>>>>>>>>>>>>>>>>> friendly URL for a navigation node but when I go to the website it's not
>>>>>>>>>>>>>>>>>>>>>> using a FU.
>>>>>>>>>>>>>>>>>>>>>> So do I have to set something up in Apache?
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> I want to avoid Apache as I am not experienced in
>>>>>>>>>>>>>>>>>>>>>> handling rewrites in there.
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Op donderdag 7 maart 2013 00:04:58 UTC+1 schreef
>>>>>>>>>>>>>>>>>>>>>> Marco van den Oever het volgende:
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> Hi all, I'm changing website url's from old to
>>>>>>>>>>>>>>>>>>>>>>> Farcry url's, I am not really sure to use FU's, it seems hard to set up and
>>>>>>>>>>>>>>>>>>>>>>> is it really better for search results?
>>>>>>>>>>>>>>>>>>>>>>> Also should I use 301 redirect in the Apache server
>>>>>>>>>>>>>>>>>>>>>>> or can I just create my own cfml redirection code and place it in my header?
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> All together there are up to almost 1000 url's, so
>>>>>>>>>>>>>>>>>>>>>>> whats the best approach...
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>> You received this message cos you are subscribed to
>>>>>>>>>>>>>>>>>>>> "farcry-dev" Google group.
>>>>>>>>>>>>>>>>>>>> To post, email: farcr...-/[email protected]
>>>>>>>>>>>>>>>>>>>> To unsubscribe, email: farcry-dev+...@**googlegroups.**
>>>>>>>>>>>>>>>>>>>> co**********m
>>>>>>>>>>>>>>>>>>>> For more options: http://groups.google.com/**group*****
>>>>>>>>>>>>>>>>>>>> *******/farcry-dev<http://groups.google.com/group/farcry-dev>
>>>>>>>>>>>>>>>>>>>> ------------------------------**************--
>>>>>>>>>>>>>>>>>>>> Follow us on Twitter: http://twitter.com/farcry
>>>>>>>>>>>>>>>>>>>> ---
>>>>>>>>>>>>>>>>>>>> You received this message because you are subscribed to
>>>>>>>>>>>>>>>>>>>> the Google Groups "farcry-dev" group.
>>>>>>>>>>>>>>>>>>>> To unsubscribe from this group and stop receiving
>>>>>>>>>>>>>>>>>>>> emails from it, send an email to farcry-dev+...@**
>>>>>>>>>>>>>>>>>>>> googlegroups.**co**********m.
>>>>>>>>>>>>>>>>>>>> For more options, visit https://groups.google.com/**
>>>>>>>>>>>>>>>>>>>> grou************ps/opt_out<https://groups.google.com/groups/opt_out>
>>>>>>>>>>>>>>>>>>>> .
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> You received this message cos you are subscribed to
>>>>>>>>>>>>>>>>>> "farcry-dev" Google group.
>>>>>>>>>>>>>>>>>> To post, email: farcr...-/[email protected]
>>>>>>>>>>>>>>>>>> To unsubscribe, email: farcry-dev+...@googlegroups.**co**
>>>>>>>>>>>>>>>>>> ********m
>>>>>>>>>>>>>>>>>> For more options: http://groups.google.com/**group*******
>>>>>>>>>>>>>>>>>> ***/farcry-dev<http://groups.google.com/group/farcry-dev>
>>>>>>>>>>>>>>>>>> ------------------------------************--
>>>>>>>>>>>>>>>>>> Follow us on Twitter: http://twitter.com/farcry
>>>>>>>>>>>>>>>>>> ---
>>>>>>>>>>>>>>>>>> You received this message because you are subscribed to
>>>>>>>>>>>>>>>>>> the Google Groups "farcry-dev" group.
>>>>>>>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails
>>>>>>>>>>>>>>>>>> from it, send an email to farcry-dev+...@googlegroups.**
>>>>>>>>>>>>>>>>>> co**********m.
>>>>>>>>>>>>>>>>>> For more options, visit https://groups.google.com/**grou*
>>>>>>>>>>>>>>>>>> *********ps/opt_out<https://groups.google.com/groups/opt_out>
>>>>>>>>>>>>>>>>>> .
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>> You received this message cos you are subscribed to
>>>>>>>>>>>>> "farcry-dev" Google group.
>>>>>>>>>>>>> To post, email: farcr...-/[email protected]
>>>>>>>>>>>>> To unsubscribe, email: farcry-dev+...@**googlegroups.**co*****
>>>>>>>>>>>>> *m
>>>>>>>>>>>>> For more options: http://groups.google.com/**group********
>>>>>>>>>>>>> /farcry-dev <http://groups.google.com/group/farcry-dev>
>>>>>>>>>>>>> ------------------------------**********--
>>>>>>>>>>>>> Follow us on Twitter: http://twitter.com/farcry
>>>>>>>>>>>>> ---
>>>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>>>> Google Groups "farcry-dev" group.
>>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>>>>>>>> it, send an email to farcry-dev+...@**googlegroups.**co******m
>>>>>>>>>>>>> .
>>>>>>>>>>>>> For more options, visit https://groups.google.com/**grou******
>>>>>>>>>>>>> **ps/opt_out <https://groups.google.com/groups/opt_out>.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>> You received this message cos you are subscribed to "farcry-dev"
>>>>>>>>>>> Google group.
>>>>>>>>>>> To post, email: farcr...-/[email protected]
>>>>>>>>>>> To unsubscribe, email: farcry-dev+...@**googlegroups.**co****m
>>>>>>>>>>> For more options: http://groups.google.com/**group******
>>>>>>>>>>> /farcry-dev <http://groups.google.com/group/farcry-dev>
>>>>>>>>>>> ------------------------------********--
>>>>>>>>>>> Follow us on Twitter: http://twitter.com/farcry
>>>>>>>>>>> ---
>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>> Google Groups "farcry-dev" group.
>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>>>>>> it, send an email to farcry-dev+...@**googlegroups.**co****m.
>>>>>>>>>>> For more options, visit https://groups.google.com/**grou******
>>>>>>>>>>> ps/opt_out <https://groups.google.com/groups/opt_out>.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>> You received this message cos you are subscribed to "farcry-dev"
>>>>>>>>> Google group.
>>>>>>>>> To post, email: farcr...-/[email protected]
>>>>>>>>> To unsubscribe, email: farcry-dev+...@googlegroups.**co****m
>>>>>>>>> For more options: http://groups.google.com/**group****/farcry-dev<http://groups.google.com/group/farcry-dev>
>>>>>>>>> ------------------------------******--
>>>>>>>>> Follow us on Twitter: http://twitter.com/farcry
>>>>>>>>> ---
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>> Groups "farcry-dev" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send an email to farcry-dev+...@googlegroups.**co****m.
>>>>>>>>> For more options, visit https://groups.google.com/**grou****
>>>>>>>>> ps/opt_out <https://groups.google.com/groups/opt_out>.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> --
>>>>>> You received this message cos you are subscribed to "farcry-dev"
>>>>>> Google group.
>>>>>> To post, email: farcr...-/[email protected]
>>>>>> To unsubscribe, email: farcry-dev+...@**googlegroups.**com
>>>>>> For more options: http://groups.google.com/**group**/farcry-dev<http://groups.google.com/group/farcry-dev>
>>>>>> ------------------------------****--
>>>>>> Follow us on Twitter: http://twitter.com/farcry
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "farcry-dev" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to farcry-dev+...@**googlegroups.**com.
>>>>>> For more options, visit https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out>
>>>>>> .
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>> You received this message cos you are subscribed to "farcry-dev" Google
>>>> group.
>>>> To post, email: farcr...-/[email protected]
>>>> To unsubscribe, email: farcry-dev+...@**googlegroups.com
>>>> For more options: http://groups.google.com/**group/farcry-dev<http://groups.google.com/group/farcry-dev>
>>>> ------------------------------**--
>>>> Follow us on Twitter: http://twitter.com/farcry
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "farcry-dev" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to farcry-dev+...@**googlegroups.com.
>>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>
>>>>
>>>>
>>> --
>> You received this message cos you are subscribed to "farcry-dev" Google
>> group.
>> To post, email: farcr...-/[email protected] <javascript:>
>> To unsubscribe, email: farcry-dev+...-/[email protected] <javascript:>
>> For more options: http://groups.google.com/group/farcry-dev
>> --------------------------------
>> Follow us on Twitter: http://twitter.com/farcry
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "farcry-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to farcry-dev+...-/[email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
--
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev-/[email protected]
To unsubscribe, email: farcry-dev+unsubscribe-/[email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
---
You received this message because you are subscribed to the Google Groups "farcry-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/groups/opt_out.