简体   繁体   中英

Joomla 2.5 read all not working


I've installed Joomla 2.5 using an hosting solution. I've renamed htaccess.txt to .htaccess, then activated Joomla SEO settings and changed the router.php file to remove articles id. Everything seems to work except that when I click on a ReadAll link (to read the rest of an article) I'm redirected to: http://XXXXX.com/component/content/article/mycategory/myarticle Why is the "component/content/article" included as link to the article ?

Following here is my .htaccess file.

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# 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.

Any clue ? Thanks Francesco

This is the default content component router behavior. If you want to have a custom url for the article, or per categories -> articles, then you need to create a menu item either for that specific article or a category menu item for the category of these articles.
Then the menu item alias will be used to built the url for that article.

//ADDING SOME MORE INFORMATION AND EXAMPLES

If you have only few articles assigned in any category, and you want to use them as static pages with a predefined url, then create one single article menu item for each article. eg you have article "Article A" in category "uncategorized". Create a single article menu item with name "Article A" and choose the corresponding article. The new (main) url for that article will be www.domain.com/article-a.html.

If you have a category where you want to post many articles (like a blog style):
Create a category blog menu item, and choose the corresponding category. Then the new urls for the articles of that category, will use in their url the name of the menu item you created.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM