Welcome to WebmasterWorld Guest from 54.196.224.166

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Joomla HTACCESS Rewrite Rule Blunder. I know you can remove from url

Oversea's told me it cannot be done. They Can't remove index.php

     

acimag

9:37 pm on Feb 2, 2010 (gmt 0)

5+ Year Member



So oversea's is coding the project for us using a custom joomla application. The problem is that when i told them clean urls. They are insisting that
www.domain.com/index.php/whatever--the--section--is is the proper way to code the url. I told them that the proper way to code the url is

www.domain.com/whatever--the--section--is.html

I requested the htaccess file and can't see where the change needs to be because i write my htaccess differently.

mine usually looks like
RewriteRule ^([^/]*)\.htm$ /?p=$1 [L]

BUT NOT THERES... See Below. Is there anyway that this can be fixed..

########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section

g1smd

4:01 am on Feb 3, 2010 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



URLs are defined by the links on the pages, and the URL request to the server is then processed by the rewrite.

You'll need to edit the script that generates the links on the page as well as configure the rewrite. I agree, lose the index.php part from the URL. If any of those are already indexed, you'll also need a redirect from old to new URL.

jdMorgan

3:11 pm on Feb 3, 2010 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



And put the URL-path exclusions *before* the file-exists checks in that Joomla code. This will more than double its performance...

I suggest:

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html?|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php [L]

Jim