-
AuthorPosts
-
alexsmirnov Friend
alexsmirnov
- Join date:
- July 2012
- Posts:
- 786
- Downloads:
- 1
- Uploads:
- 226
- Thanks:
- 226
- Thanked:
- 163 times in 119 posts
February 1, 2013 at 3:06 pm #184589Hi 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 ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
February 1, 2013 at 5:17 pm #482048The 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 🙂
1 user says Thank You to TomC for this useful post
alexsmirnov Friendalexsmirnov
- Join date:
- July 2012
- Posts:
- 786
- Downloads:
- 1
- Uploads:
- 226
- Thanks:
- 226
- Thanked:
- 163 times in 119 posts
February 1, 2013 at 7:11 pm #482072Hi 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 Friendalexsmirnov
- Join date:
- July 2012
- Posts:
- 786
- Downloads:
- 1
- Uploads:
- 226
- Thanks:
- 226
- Thanked:
- 163 times in 119 posts
February 4, 2013 at 3:04 pm #482384Hi there,
Could we resume this conversation please?
Ta
Alex
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
February 5, 2013 at 7:44 pm #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). 🙂1 user says Thank You to TomC for this useful post
alexsmirnov Friendalexsmirnov
- Join date:
- July 2012
- Posts:
- 786
- Downloads:
- 1
- Uploads:
- 226
- Thanks:
- 226
- Thanked:
- 163 times in 119 posts
February 5, 2013 at 8:39 pm #482594Cheers for that. Please keep me posted.
Ta
Alex
alexsmirnov Friendalexsmirnov
- Join date:
- July 2012
- Posts:
- 786
- Downloads:
- 1
- Uploads:
- 226
- Thanks:
- 226
- Thanked:
- 163 times in 119 posts
February 6, 2013 at 6:43 pm #482721FYI: 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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
February 11, 2013 at 4:14 pm #483078You 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
1 user says Thank You to Ninja Lead for this useful post
alexsmirnov Friendalexsmirnov
- Join date:
- July 2012
- Posts:
- 786
- Downloads:
- 1
- Uploads:
- 226
- Thanks:
- 226
- Thanked:
- 163 times in 119 posts
February 20, 2013 at 3:26 am #483967Oh 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
-
AuthorPosts
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