Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • alexsmirnov Friend
    #184589

    Hi there,

    As per the subject title, when I click on the site’s text logo Joomalex, the index.php gets appended to the URL, making it http://www.joomalex.com/index.php. Click on the home icon outputs just http://www.joomalex.com.

    index.php shows up in a URL in the above scenario only, nowhere else.

    My Joomla SEF URLs are turned with mod_rewrite ON.

    Ta

    Alex

    TomC Moderator
    #482048

    The Global Configuration of Joomla! allows you to turn on SEF URLs, but this is either with or without Apache mod_rewrite. Without mod_rewrite (which might be needed because IIS is favoured over Apache), all URLs include an /index.php/ segment. But when you switch to Apache mod_rewrite after a while, you might want to redirect all old URLs with /index.php/ to URLs without /index.php/.

    The key lies within the usage of the htaccess-file, which should be named .htaccess (starting with a dot, and without file-extension). If mod_rewrite is enabled, the htaccess-file allows you to activate the so-called RewriteEngine. This is used to redirect SEF-links to the Joomla! application-file index.php, but it can also be used to redirect old URLs to new URLs. In these cases, all additions are made just after the RewriteEngine statement, so before the actual Joomla! SEF-section.

    RewriteEngine On

    Removing /index.php/
    To remove the /index.php/ part from all URLs, add two lines after the RewriteEngine statement:

    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/index.php/
    RewriteRule ^index.php/(.*) /$1 [R,L]

    Hope That Helps 🙂

    alexsmirnov Friend
    #482072

    Hi Tom,

    I played with your directives, but to no joy, I am afraid. The URL to my text logo still retained index.php and going from home onto the second level pages generated 404s.

    Please have a look at my .htaccess SEF section:

    # Begin - Joomla! core SEF Section.
    #
    RewriteRule .* -
    #
    # If the requested path and file is not /index.php and the request
    # has not already been internally rewritten to the index.php script
    RewriteCond %{REQUEST_URI} !^/index.php

    # and the request is for something within the component folder,
    # or for the site root, or for an extensionless URL, or the
    # requested URL ends with one of the listed extensions
    RewriteCond %{REQUEST_URI} /component/|(/[^.]*|.(php|html?|feed|pdf|vcf|raw))$ [NC]
    # and the requested path and file doesn't directly match a physical file
    RewriteCond %{REQUEST_FILENAME} !-f
    # and the requested path and file doesn't directly match a physical folder
    RewriteCond %{REQUEST_FILENAME} !-d
    # internally rewrite the request to the index.php script
    RewriteRule .* index.php [L]

    ## End - Joomla! core SEF Section.

    Would you like to have a go at this directly from my Cpanel/Joomla admin?

    Cheers,

    Alex

    alexsmirnov Friend
    #482384

    Hi there,

    Could we resume this conversation please?

    Ta

    Alex

    TomC Moderator
    #482571

    <em>@alexsmirnov 358671 wrote:</em><blockquote>Hi there,

    Could we resume this conversation please?

    Ta

    Alex</blockquote>
    I could take a look, sure . . . . but what I am also doing for you is submitting a Help Desk Ticket – for additional review/suggestion from others of the JA Support Team (the more the merrier). 🙂

    alexsmirnov Friend
    #482594

    Cheers for that. Please keep me posted.

    Ta

    Alex

    alexsmirnov Friend
    #482721

    FYI: Please keep in mind that my server goes offline tonight at 22:00 GMT for a major maintenance. I am expecting the job to complete in about 12 to 24 hours.

    Regards,

    Alex

    Ninja Lead Moderator
    #483078

    You can fix the problem on your site with my suggestion.

    Open .htaccess file and add this script below RewriteEngine On

    # Remove index.php from URL requests
    RewriteCond %{THE_REQUEST} ^{3,9} /(([^/]+/)*)index.(php|html?) HTTP/
    RewriteRule ^([^/]+/)*index.(html?|php)$ http://www.joomalex.com/$1 [R=301,L]

    Let me know if it helps

    alexsmirnov Friend
    #483967

    Oh man, I didn’t realise Ninja Lead has answered.

    Thank you so much dude, – your RegEx worked just like charm. Tom, cheers to you as well for you support, man. I am now closing this tread as solved.

    Regards,

    Alex

Viewing 9 posts - 1 through 9 (of 9 total)

This topic contains 9 replies, has 3 voices, and was last updated by  alexsmirnov 11 years, 9 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum