Loại bỏ /index.php trong addon domain
Moderator: hungkhanggl
Forum rules
-
- Joomla! Apprentice
- Posts: 17
- Joined: Thu Jan 05, 2012 8:11 pm
Loại bỏ /index.php trong addon domain
Xin chào mọi người,
Em có mua một host Joomla và đã cài:
- 1 Joomla vào domain chính www.joystudio.vn
- 1 Joomla vào addon domain www.gdn.vn (nằm tại thư mục gdn.vn bên trong public_html)
Hiện giờ URL của trang gdn có dạng www.gdn.vn/index.php/xxx. Và em muốn bỏ cái index.php đi thì làm cách nào mong mọi người chỉ giúp.
Em xài Joomla 1.7 và đã kích hoạt Use URL rewriting trong Global config, đã rename htaccess.txt thành .htaccess nhưng webstie lại báo lỗi không tìm thấy liên kết.
Mong nhận được sự giúp đỡ của mọi người. Em xin cảm ơn
Em có mua một host Joomla và đã cài:
- 1 Joomla vào domain chính www.joystudio.vn
- 1 Joomla vào addon domain www.gdn.vn (nằm tại thư mục gdn.vn bên trong public_html)
Hiện giờ URL của trang gdn có dạng www.gdn.vn/index.php/xxx. Và em muốn bỏ cái index.php đi thì làm cách nào mong mọi người chỉ giúp.
Em xài Joomla 1.7 và đã kích hoạt Use URL rewriting trong Global config, đã rename htaccess.txt thành .htaccess nhưng webstie lại báo lỗi không tìm thấy liên kết.
Mong nhận được sự giúp đỡ của mọi người. Em xin cảm ơn
-
- Joomla! Apprentice
- Posts: 17
- Joined: Thu Jan 05, 2012 8:11 pm
Re: Loại bỏ /index.php trong addon domain
Em đã mò được rồi, xin cảm ơn mọi người. Chỉ cần thêm dấu chấm (.) đằng sau RewriteBase /. và remove dấu #JOY Studio wrote:Xin chào mọi người,
Em có mua một host Joomla và đã cài:
- 1 Joomla vào domain chính http://www.joystudio.vn
- 1 Joomla vào addon domain http://www.gdn.vn (nằm tại thư mục gdn.vn bên trong public_html)
Hiện giờ URL của trang gdn có dạng http://www.gdn.vn/index.php/xxx. Và em muốn bỏ cái index.php đi thì làm cách nào mong mọi người chỉ giúp.
Em xài Joomla 1.7 và đã kích hoạt Use URL rewriting trong Global config, đã rename htaccess.txt thành .htaccess nhưng webstie lại báo lỗi không tìm thấy liên kết.
Mong nhận được sự giúp đỡ của mọi người. Em xin cảm ơn
-
- Joomla! Enthusiast
- Posts: 112
- Joined: Fri May 06, 2011 7:13 am
Re: Loại bỏ /index.php trong addon domain
luu ý thêm anh em là bên cung cấp dich vụ phải bật modrewite thì chức năng trên mới chạy
Joomla code vip: http://phpcantho.com
Thiet ke web can tho: http://dichvu.phpcantho.com
Tải phần mềm bằng link mediafire tại linksoftvn.com
Thiet ke web can tho: http://dichvu.phpcantho.com
Tải phần mềm bằng link mediafire tại linksoftvn.com
-
- Joomla! Enthusiast
- Posts: 241
- Joined: Mon Dec 14, 2009 1:52 pm
- Contact:
Re: Loại bỏ /index.php trong addon domain
Về htaccess thì mình ko rành lắm nhưng đối với host Joomla bên nhân hòa thì bạn lại phải đưa cái
Options +FollowSymLinks
vào thành chú thích tức là thêm dấu # vào đằng trước dòng đó mới chạy được.
Options +FollowSymLinks
vào thành chú thích tức là thêm dấu # vào đằng trước dòng đó mới chạy được.
-
- Joomla! Apprentice
- Posts: 17
- Joined: Thu Jan 05, 2012 8:11 pm
Re: Loại bỏ /index.php trong addon domain
Đúng rồi anh. Em them dấu # vào dòng đó và them dấu . đằng sau RewriteBasetomytran wrote:Về htaccess thì mình ko rành lắm nhưng đối với host Joomla bên nhân hòa thì bạn lại phải đưa cái
Options +FollowSymLinks
vào thành chú thích tức là thêm dấu # vào đằng trước dòng đó mới chạy được.
-
- Joomla! Enthusiast
- Posts: 112
- Joined: Fri May 06, 2011 7:13 am
Re: Loại bỏ /index.php trong addon domain
những cấu hình đó là do hạ tầng apache quy định, muốn chỉnh như ý thì nhà cung cấp dich vụ phải bật chức năng cho phép tạo mod rewrite nhưng đổi lại hạ tầng truyền dẫn và bộ đệm apache sẽ tốn nhiều tài nguyên hơn
Joomla code vip: http://phpcantho.com
Thiet ke web can tho: http://dichvu.phpcantho.com
Tải phần mềm bằng link mediafire tại linksoftvn.com
Thiet ke web can tho: http://dichvu.phpcantho.com
Tải phần mềm bằng link mediafire tại linksoftvn.com
-
- Joomla! Apprentice
- Posts: 20
- Joined: Thu Dec 29, 2011 5:02 am
Re: Loại bỏ /index.php trong addon domain
em làm theo bước sau:
1) rename htaccess.txt thành .htaccess trên server
2) url rewrite --> yes, rùi save
mà vẫn k đc, đây là file htaccess.txt của em:
Em vào sẵn global config --> server. sau đó rename htaccess trên server rùi mới chỉnh yes kái rewrite rùi save lại, mà nó báo lỗi 500 internal server error.
ai chỉ lại dùm e từng bước với, em cũng xài host nhanhoa.
đây là web em:
http://shop.mieushop.com
1) rename htaccess.txt thành .htaccess trên server
2) url rewrite --> yes, rùi save
mà vẫn k đc, đây là file htaccess.txt của em:
Em vào sẵn global config --> server. sau đó rename htaccess trên server rùi mới chỉnh yes kái rewrite rùi save lại, mà nó báo lỗi 500 internal server error.
ai chỉ lại dùm e từng bước với, em cũng xài host nhanhoa.
đây là web em:
http://shop.mieushop.com
Code: Select all
##
# @version $Id: htaccess.txt 21101 2011-04-07 15:47:33Z dextercowley $
# @package Joomla
# @copyright Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##
##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
##
## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks
## Mod_rewrite in use.
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.
-
- Joomla! Apprentice
- Posts: 17
- Joined: Thu Jan 05, 2012 8:11 pm
Re: Loại bỏ /index.php trong addon domain
Bạn rem (thêm dấu sao) dòng này lại, có nói ở bên trên mà?
Options +FollowSymLinks
Options +FollowSymLinks
-
- Joomla! Apprentice
- Posts: 20
- Joined: Thu Dec 29, 2011 5:02 am
Re: Loại bỏ /index.php trong addon domain
tks bro, mình làm đc rùi, mà nó vẫn còn kái /en, kái này chỉnh ở đâu nhỉ?JOY Studio wrote:Bạn rem (thêm dấu sao) dòng này lại, có nói ở bên trên mà?
Options +FollowSymLinks
-
- Joomla! Apprentice
- Posts: 17
- Joined: Thu Jan 05, 2012 8:11 pm
Re: Loại bỏ /index.php trong addon domain
Cái này hơi phức tạp nhưng có mấy bài hướng dẫn. Bạn search trước đi có gì mình chỉ tiếp :P
-
- Joomla! Apprentice
- Posts: 20
- Joined: Thu Dec 29, 2011 5:02 am
Re: Loại bỏ /index.php trong addon domain
tks bro, mình disable kái plugin language filter đi al2 đc, hihiJOY Studio wrote:Cái này hơi phức tạp nhưng có mấy bài hướng dẫn. Bạn search trước đi có gì mình chỉ tiếp :P
- hoangbdshcm
- I've been banned!
- Posts: 38
- Joined: Wed Oct 10, 2012 3:22 pm
Re: Loại bỏ /index.php trong addon domain
Em cũng gặp trường hợp này. link của em thế này: http://[spam].net/index.php/can-ho-ehome-3, em cũng muổn bỏ /index.php/ nhưng bên hosting họ bảo phải sử dụng sever của linux mới bỏ được đúng khộng ạ?, hiện tại em đang sài sever windows, mong các pro tư vấn, cảm ơn
-
- Joomla! Apprentice
- Posts: 10
- Joined: Wed Apr 10, 2013 11:34 am
Re: Loại bỏ /index.php trong addon domain
Mình làm thế này thì ok nè:
- vào nơi chứa source code đổi tập tin htaccess.txt thành .htaccess
- mở tập tin .htaccess đã được đổi tên ở bước 1, tìm đến dòng RewriteBase đổi thành RewriteBase /
- vào nơi chứa source code đổi tập tin htaccess.txt thành .htaccess
- mở tập tin .htaccess đã được đổi tên ở bước 1, tìm đến dòng RewriteBase đổi thành RewriteBase /
-
- Joomla! Explorer
- Posts: 313
- Joined: Thu Sep 15, 2011 9:08 am
- Location: hawktemplates.com
- Contact:
Re: Loại bỏ /index.php trong addon domain
Chính xác rồi đó bạn, mình có viết hướng dẫn chi tiết ở đây nè:alexrianz wrote:Mình làm thế này thì ok nè:
- vào nơi chứa source code đổi tập tin htaccess.txt thành .htaccess
- mở tập tin .htaccess đã được đổi tên ở bước 1, tìm đến dòng RewriteBase đổi thành RewriteBase /
http://forum.joomlaviet.info/threads/7154/
Unlocking Joomla's Potential: Insights, Tips, and Trends: https://hawktemplates.com/blog
-
- Joomla! Intern
- Posts: 58
- Joined: Sun Jun 09, 2013 2:30 am
- Location: Bình Tân
- Contact:
Re: Loại bỏ /index.php trong addon domain
Mò hoài mà vẫn ko cài được dù xem hướng dẫn, cái này hơi khó chắc phải Pro mới kham.
-
- Joomla! Apprentice
- Posts: 9
- Joined: Fri Jul 12, 2013 3:49 am
Re: Loại bỏ /index.php trong addon domain
Muốn sử dụng chức năng loại bỏ tendomain/index.php bạn nên chọn các host có mod rewrite nhé!
-
- Joomla! Apprentice
- Posts: 14
- Joined: Wed Sep 12, 2012 6:22 am
- Contact:
Re: Loại bỏ /index.php trong addon domain
cũng trường hợp này nhưng dùng server web là Nginx thì sao cấu hình như thế nào các bạn?
Please read the Forum rules regarding signatures: http://forum.joomla.org/viewtopic.php?t=65