0% found this document useful (0 votes)
4 views30 pages

Apexurls 140703031845 Phpapp02

The document discusses the importance of URLs for both humans and search engines, highlighting how APEX URLs differ and can be optimized using Oracle DB, ORDS, and APEX. It emphasizes the need for semantically relevant and compelling URLs to improve search engine rankings and provides insights on transforming APEX URL syntax into more human-readable formats. Additionally, it covers how search engines crawl URLs and the role of sitemaps and robots.txt files in managing site visibility.

Uploaded by

oradev16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views30 pages

Apexurls 140703031845 Phpapp02

The document discusses the importance of URLs for both humans and search engines, highlighting how APEX URLs differ and can be optimized using Oracle DB, ORDS, and APEX. It emphasizes the need for semantically relevant and compelling URLs to improve search engine rankings and provides insights on transforming APEX URL syntax into more human-readable formats. Additionally, it covers how search engines crawl URLs and the role of sitemaps and robots.txt files in managing site visibility.

Uploaded by

oradev16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

APEX URLs

APEX URLs Untangled & SEOptimized


Christian Rokitta
Questions
• What are URLs
(to humans and Search Engines)
• How are APEX URLs different?
• How can we optimize this?
(using Oracle DB, ORDS, APEX only)
• Why am I sitting in this conference room and
not having a beer at the bar?
What is a URL?
• A URL is human-readable text that was designed
to replace the numbers (IP addresses) that
computers use to communicate with servers.
They also identify the (file) structure on the given
website.

• URLs describe a site or page to visitors and search


engines. Keeping them relevant, compelling, and
accurate is the key to ranking well.
Comparison of URLs
for a Canon Powershot SD400 Camera

1. Amazon.com : http://
www.amazon.com/gp/product/B0007TJ5OG/102-83
72974-4064145?v=glance&n=502394&m=ATVPDKIK
X0DER&n=3031001&s=photo&v=glance

2. DPReview.com :
http://www.dpreview.com/reviews/canonsd400/
Benefits of URLs
• Semantics
URL should semantically make sense. This is helpful
to both humans and search engines.

• Relevancy
Semantically correct URL are more likely to get
search engine-referred traffic due to the keywords
in the URL. These, like title tags, are used for
determining relevancy and computing rankings.
APEX URLs
urlsyntax.oracleapex.com
- f?p Syntax
http://apex.somewhere.com/pls/apex/f?p=4350:1:220883407765693447

• apex.somewhere.com is the URL of the server


• pls is the indicator to use the mod_plsql cartridge
• apex is the database access descriptor (DAD) name. The
DAD describes how HTTP Server connects to the
database server so that it can fulfill an HTTP request.
The default value is apex.
• f?p= is a prefix used by Oracle Application Express
• 4350 is the application being called
• 1 is the page within the application to be displayed
• 220883407765693447 is the session number
URLs and Search Engines
“Help Google crawl your site more
efficiently by indicating how we
should handle parameters in your
URLs.”

“ Use this feature only if you're


sure how parameters work.
Incorrectly excluding URLs could
result in many pages disappearing
from search.”
URL Parameters & Google

To Google, the APEX app


seems to be one page?!
Transforming f?p Syntax
f?p=App:Page:Sess:Req:Debug:ClearCache:itemNames:itemValues:PrinterFriendly

Typical URL containing a query string:


http://server/path/program?field1=value1&field2=value2&field3=value3...

Possible to transform f?p syntax?


Yes, using flexible parameters passing:

http://server/path/!schema.ff?app=100&page=1&session=1234567
&item1=value1&item2=value2&item3=value3...
flexible f
create or replace procedure apex_demo.ff(name_array in owa.vc_arr
, value_array in owa.vc_arr)
is
type f_param_array is table of varchar2(32767)
index by varchar2(20);

v_f_p_arr f_param_array;
v_f_p varchar2(32767);
v_inames varchar2(32767);
v_ivalues varchar2(32767);
begin
v_f_p_arr('app') := '';
v_f_p_arr('page') := '';
v_f_p_arr('session') := '';
v_f_p_arr('request') := '';
v_f_p_arr('debug') := '';
v_f_p_arr('clearcache') := '';
v_f_p_arr('printerfriendly') := '';


flexible f cont.


for i in 1 .. name_array.count
loop
if lower(name_array(i)) in ('app', 'page', 'session',
'request', 'debug', 'clearcache',
'printerfriendly')
then
v_f_p_arr(lower(name_array(i))) := value_array(i);
else
if length(v_inames) > 0
then
v_inames := v_inames || ',';
v_ivalues := v_ivalues || ',';
end if;

v_inames := v_inames || name_array(i);


v_ivalues := v_ivalues || value_array(i);
end if;
end loop;

flexible f

cont.
f(
v_f_p_arr('app')||
':' ||
v_f_p_arr('page')||
':' ||
v_f_p_arr('session')||
':' ||
v_f_p_arr('request')||
':' ||
v_f_p_arr('debug')||
':' ||
v_f_p_arr('clearcache')||
':' ||
v_inames ||
':' ||
v_ivalues ||
':' ||
v_f_p_arr('printerfriendly'));

end ff;
Human Readable?

http://server/path/!schema.ff?app=100&page=1&session=1234567
&item1=value1&item2=value2&item3=value3...

http://server/pagetitle/language/(sub)content/....
URL prettifying using ORDS (formerly known as Oracle APEX Listener)

Utilizing RESTful Web Service call URIs to supply


pretty, human readable URLs
Resource
Templates/Handlers

http://www.themes4apex.nl/apex/rokit/t4a/examples/ENG/fifapex
RESTful pretty URL

http://www.themes4apex.nl/apex/f?p=104:3:0::::T4A_LANG,P3_PROJECT:ENG,fifapex

http://www.themes4apex.nl/apex/rokit/t4a/examples/eng/fifapex
workspac
APEX base url e URI Resource Template
name
URI Prefix
(optional)

recommended: Peter Raganitsch, session “Going Public”


http://www.oracle-and-apex.com/hrurl-human-readable-urls-in-oracle-apex/
How do SEs find URLs
Crawling

“Google's crawl process begins with a list of web page


URLs, generated from previous crawl processes, and
augmented with Sitemap data provided by
webmasters. As Googlebot visits each of these
websites it detects links on each page and adds them
to its list of pages to crawl. New sites, changes to
existing sites, and dead links are noted and used to
update the Google index.”
Sitemap
sitemap.xml
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.si
<url>
<loc>http://themes4apex.com/apex/f?p=T4A:Home:0::::T4A_LANG:NL
</loc>
</url>
<url>
<loc>http://themes4apex.com/apex/f?p=T4A:Home:0::::T4A_LANG:ENG
</loc>
</url>
<url>
<loc>http://themes4apex.com/apex/f?p=T4A:Service:0::::T4A_LANG:NL
</loc>
</url>
<url>
<loc>http://themes4apex.com/apex/f?p=T4A:Service:0::::T4A_LANG:ENG
</loc>
</url>
… Update frequency of Sitemap:
</urlset> Google's Sitemaps crawler usually reacts to the update
frequency of your Sitemap files.
Or: set the crawl rate in Webmaster Tools.
robots.txt
• A robots.txt file restricts access to your site by search
engine robots that crawl the web. These bots are
automated, and before they access pages of a site, they
check to see if a robots.txt file exists that prevents them
from accessing certain pages.
• You need a robots.txt file only if your site includes
content that you don't want search engines to index. If
you want search engines to index everything in your
site, you don't need a robots.txt file (not even an empty
one).
• in the root of the web site hierarchy!
robots.txt example
User-agent: *
Disallow: /cgi-bin/
Disallow: /tmp/
Disallow: /junk/
Allow: /directory1/myfile.html
Sitemap: http://www.mysite.com/sitemaps/profiles-
sitemap.xml
Sitemap: http://www.othersite.nl/news/sitemap_index.xml
Links in APEX: Tabs

Solution: use list based navigation!


Visitor typing URLs?

mostly, visitors only (want to) type the


domain name or a part of it
typical architecture?
Workspace 1
www.domain1.com
dev.domain1.com Webserver app X
test.domain1.com
www.domain1.nl Oracle REST Data Services
(aka APEX Listener) Workspace 2
dev.domain1.nl
test.domain1.nl
app Y app Z
www.domain2.com

www.domain3.com
IP: 12.34.567.89 Workspace 3

app A app B
URL re-routing for the Poor
re-routing backend
create or replace PROCEDURE redirect
IS
t_host VARCHAR2(250);

t_redir proxy_rules%ROWTYPE;
BEGIN
t_host := OWA_UTIL.get_cgi_env('host');

SELECT *
INTO t_redir
FROM (SELECT *
FROM proxy_rules
WHERE UPPER(t_host) LIKE UPPER(host_pattern) /* matching rules */
ORDER BY seq, id)
WHERE ROWNUM < 2;

IF t_redir.url_type = 'X'
THEN

f(p => t_redir.apex_app || ':' || t_redir.apex_page || ':' || t_redir.apex_session);


ELSE
OWA_UTIL.redirect_url(curl => t_redir.redir_url, bclose_header => TRUE);
END IF;
EXCEPTION
WHEN OTHERS
THEN
OWA_UTIL.redirect_url(curl => 'http://www.rokit.nl', bclose_header => TRUE);
END redirect;​
defaults.xml for re-routing

<entry key="misc.defaultPage">apex</entry>

<entry key="misc.defaultPage">redirect</entry>
(public synonym & grant execute to PUBLIC)
Questions & Discussion

?? ?
http://rokitta.blogspot.com

@crokitta

[email protected]

http://www.themes4apex.com

http://plus.google.com/+ChristianRokitta

http://nl.linkedin.com/in/rokit/

You might also like