Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

How to set if default index file in JoomSEF 4.x
(1 viewing) (1) Guest
Support forum for customers who have purchased JoomSEF 4 (Joomla 1.6/1.7/2.5+ compatible). Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: How to set if default index file in JoomSEF 4.x

How to set if default index file in JoomSEF 4.x 11 years, 10 months ago #36917

Hi there
Busy duplicating my setup for a migration between J1.5 and 2.5 with SEF 3 to SEF 4. In the old site, I had the settig on Default index file setup to display index.php
My SEF urls would look like this: section/category/index.php for a typical blog layout.

How do I achieve this in JoomSEF 4? (eg. set it on / off and provide the index.php to use)

If there is not a setting, where can I alted code to do this, or set a redirect up to correct this.
Currently, it's creating urls like this: category/category.html
I want it to be category/category/index.php or otherwise I need to catch the incorrect URLS and redirect them to the new ones.
The topic has been locked.

Re: How to set if default index file in JoomSEF 4.x 11 years, 10 months ago #36927

Well, I wrote a rewrite rule to redirect visitors to the url SEF 4 now generates, but I don't know how to exclude the administrator folder from it, so this can't be used because it renders the backend useless.

RewriteRule ^(.*)/index.php$ $1.html [R=301]
The topic has been locked.

Re: How to set if default index file in JoomSEF 4.x 11 years, 10 months ago #36984

  • dajo
  • OFFLINE
  • Posts: 5069
Hi,

The option is not present in JoomSEF 4 anymore.

You can exclude the administrator directory from the rule using the RewriteCond directive. Something like (not tested):
RewriteCond %{REQUEST_URI} !^/administrator
RewriteRule ^(.*)/index.php$ $1.html [R=301]
ARTIO Support Team
The topic has been locked.

Re: How to set if default index file in JoomSEF 4.x 11 years, 10 months ago #36994

Yes, I tried that, but I can't figure out what the correct syntax must be.
There is a useful website where I test the rules, martinmelin.se/rewrite-rule-tester/
If you could help me find the solution I would be very greatful.
We have been using Joomsef on this website since Joomla 1.0 and then we migrated to 1.5 and now 2.5 needs to go live soon. There are 35000 SEF urls spread over content items, forums, business directory, galleries etc. etc. and I don't want to loose those the search engine rankings.

If all else fails, I am probably going to have to setup manual redirects for all the categories and sub category layouts. Not looking forward to it.

I would really expect SEF 4 to have similar or better features than SEF 3.

Thanks
P
The topic has been locked.

Re: How to set if default index file in JoomSEF 4.x 11 years, 10 months ago #36997

  • dajo
  • OFFLINE
  • Posts: 5069
The following rule works for me:
RewriteCond %{REQUEST_URI} !^/administrator
RewriteRule ^(.*)/index.php$ $1.html [R=301,L]


I had to add the ",L" to the RewriteRule flags, otherwise the following rules modified the result.
ARTIO Support Team
The topic has been locked.
  • Page:
  • 1
Přihlášení uživatele Prázdný