homepage Welcome to WebmasterWorld Guest from 54.161.214.221
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
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




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

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




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

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




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved