[TYPO3] realurl installation not working

BMolayi at datacolor.com BMolayi at datacolor.com
Fri Jan 18 23:20:47 CET 2008


Thanks Bernhard and Dmitry.
I checked in httpd.conf and found that I had a line: AllowOverride
"None". So, I changed that line to allow my AllowOverride in .htaccess
to work.
After restarting the server, realurl started to work.
After that, I inserted the following in my localconf.php file:

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
	 'pagePath' => array (
		'rootpage_id' => 1,
        'type' => 'user',
        'userFunc' =>
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
        'spaceCharacter' => '-',
        'languageGetVar' => 'L',
        'expireDays' => 3,
	 ),

 );

Now, I am getting nice real URL's that reproduce the page tree structure
with page names.

I was thinking about a way to bypass intermediate tree nodes for some of
the important pages. For example for a page:
mysite.com/products/cameras/SX45 I was wondering if there was a way to
force realurl to create a url like this: mysite.com/SX45
But then I thought it must be impossible to do, because in this URL we
are missing necessary information that enables the system to find the
page (the intermediate nodes in the tree structure). What do you think?

Bijan Molayi
Phone: +1 609-924-2189-X7202
Email: bmolayi at datacolor.com
Skype: bijan_m1
 

-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of
Bernhard Kraft
Sent: Friday, January 18, 2008 3:37 PM
To: typo3-english at lists.netfielders.de
Subject: Re: [TYPO3] realurl installation not working

BMolayi at datacolor.com wrote:

> I did the checks that you suggested below: on the sitemap I correctly
> get /123/ in the URL, which shows that the realurl is working.

If the UID of the page is "123" but its name is for example "Company"
you should rather get a link like "/company/" ... cause normally realURL
tries to insert the title of the linked page instead of the UID (thats
why
it is called realURL :) -- but probably that changed since realURL
supports
autoConfiguration (I didn't try that yet).

> Now, I'm not sure where to check (or add) AllowOverride in web server?
> Where can I find the "web server configuration file for the directory
of
> your site"? I added a line with: AllowOverride ALL to the .htaccess of
> my installation, but I still get the 404 error. I should say that I
> haven't yet restarted my server.

In the .htaccess of you web-root (where the fileadmin, typo3, typo3conf
directories reside) you should have the lines:
------------------
RewriteEngine On
RewriteRule
^(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/
- [L]
RewriteRule ^typo3$ typo3/index_re.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L]
------------------

In "/etc/apache2/sites-enabled/004-www.my_site_url.com
(Name may vary) - in fact you have to modify the apache-config file for
the domain
you are going to configure ...

In this file you will find something like:
---------------------
<Directory /var/www/html>
  Options ExecCGI -Indexes FollowSymLinks Includes MultiViews
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory>
--------------

where /var/www/html is the webroot of your site - if you don't have such
a block you
can simply add it there ...

you can try around with the options - I would suggest using
"-Indexes" ... not allowing to see all files in directory
"FollowSymLinks" ... required for T3

the rest is optional. but don't forget the "AllowOverride All" like
Dmitry wrote ...

and please note that normally you have to visit the page first - so all
realURL links
get generated and stored in cache - and only then you will be able to
call a link directly
by entering the URL into the browser URL line ....

so it isn't possible in all cases to enter a realURL link into the
browser URL line and hope
for it to work ... AFAIR it works in some cases but not in all.

the thing is just that realURL a link to a page must get generated (by
some other page)
before the link can get called.



greets,
Bernhard














> 
> Bijan Molayi
> Phone: +1 609-924-2189-X7202
> Email: bmolayi at datacolor.com
> Skype: bijan_m1
>  
> -----Original Message-----
> From: typo3-english-bounces at lists.netfielders.de
> [mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of
Dmitry
> Dulepov [typo3]
> Sent: Friday, January 18, 2008 12:09 AM
> To: typo3-english at lists.netfielders.de
> Subject: Re: [TYPO3] realurl installation not working
> 
> Hi!
> 
> BMolayi at datacolor.com wrote:
>> 3- Added the following to the bottom of my /typo3conf/localconf.php
>> file:
> 
> This is not necessary any more. Realurl comes with autoconfiguration,
it
> could generate optimal configuration for you.
> 
>> 4- In fact, all I am trying to do for the moment, is to get realurl
to
>> work in its simplest form. So, with the above localconf.php, I expect
>> the following to happen: If I type this address:
>> http://www.my_site_url.com/123/    or the following address:
>> http://www.my_site_url.com/123/page.html in one of the 2 cases (I
> think
>> the second case) it should return the page at:
>> http://www.my_site_url.com/index.php?id=123 . In fact, I am getting a
>> 404 - page not found error.
>>
>>  
>>
>> I would appreciate if somebody could guide me in the right direction.
> 
> Firsts, check if realurl generates links. Put a sitemap element on the
> home page and see what URLs you get. If you get /index.php?id=123,
then
> realurl is not working. If you get /123/, it is working at least
> partially.
> 
> Assuming that it is works, check if rewriting works correctly. Check
> what is the value of AllowOverride in web server configuration file
for
> the directory of your site. If you cannot find value, set it to "All"
> (without quotes). If it is set incorrectly, rewrite directives will be
> silently ignored and you will get 404. Restart web server and see if
you
> still get 404. If yes, activate rewrite log for this site using
> RewriteLog directive in virtual host configuration (this directive
does
> not work from .htaccess). Set debugging level to maximum. Click on the
> realurl-ed link and check rewrite logs. What do they show?
> 
> 
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english



The e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and or privileged information. Any review, dissemination, copying, printing or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material from any computer.




More information about the TYPO3-english mailing list