Loại bỏ /index.php trong addon domain

Các thắc mắc, hướng dẫn về cài đặt và cấu hình Joomla

Moderator: hungkhanggl

Forum rules
Locked
JOY Studio
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Thu Jan 05, 2012 8:11 pm

Loại bỏ /index.php trong addon domain

Post by JOY Studio » Thu Jan 19, 2012 3:33 pm

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

JOY Studio
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Thu Jan 05, 2012 8:11 pm

Re: Loại bỏ /index.php trong addon domain

Post by JOY Studio » Thu Jan 19, 2012 3:54 pm

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
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 #

nhuanctu
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 112
Joined: Fri May 06, 2011 7:13 am

Re: Loại bỏ /index.php trong addon domain

Post by nhuanctu » Sat Jan 28, 2012 1:38 pm

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

tomytran
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 241
Joined: Mon Dec 14, 2009 1:52 pm
Contact:

Re: Loại bỏ /index.php trong addon domain

Post by tomytran » Sun Jan 29, 2012 5:26 pm

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.
TOHA GROUP [ https://toha.us ]

Nghiền ĐỊA ỐC [ Trang hỗ trợ thông tin về Bất Động Sản ]

JOY Studio
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Thu Jan 05, 2012 8:11 pm

Re: Loại bỏ /index.php trong addon domain

Post by JOY Studio » Mon Jan 30, 2012 5:20 pm

tomytran 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.
Đúng rồi anh. Em them dấu # vào dòng đó và them dấu . đằng sau RewriteBase

nhuanctu
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 112
Joined: Fri May 06, 2011 7:13 am

Re: Loại bỏ /index.php trong addon domain

Post by nhuanctu » Tue Jan 31, 2012 12:53 am

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

hunter205
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Dec 29, 2011 5:02 am

Re: Loại bỏ /index.php trong addon domain

Post by hunter205 » Sun Apr 08, 2012 5:15 am

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

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.

JOY Studio
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Thu Jan 05, 2012 8:11 pm

Re: Loại bỏ /index.php trong addon domain

Post by JOY Studio » Sun Apr 08, 2012 5:26 am

Bạn rem (thêm dấu sao) dòng này lại, có nói ở bên trên mà?

Options +FollowSymLinks

hunter205
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Dec 29, 2011 5:02 am

Re: Loại bỏ /index.php trong addon domain

Post by hunter205 » Sun Apr 08, 2012 5:52 am

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
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
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Thu Jan 05, 2012 8:11 pm

Re: Loại bỏ /index.php trong addon domain

Post by JOY Studio » Sun Apr 08, 2012 6:00 am

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

hunter205
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Dec 29, 2011 5:02 am

Re: Loại bỏ /index.php trong addon domain

Post by hunter205 » Sun Apr 08, 2012 6:16 am

JOY 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
tks bro, mình disable kái plugin language filter đi al2 đc, hihi

User avatar
hoangbdshcm
I've been banned!
Posts: 38
Joined: Wed Oct 10, 2012 3:22 pm

Re: Loại bỏ /index.php trong addon domain

Post by hoangbdshcm » Fri Feb 01, 2013 6:46 am

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

alexrianz
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Apr 10, 2013 11:34 am

Re: Loại bỏ /index.php trong addon domain

Post by alexrianz » Thu Apr 11, 2013 4:19 am

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 /

hungkhanggl
Joomla! Explorer
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

Post by hungkhanggl » Wed Jun 19, 2013 10:43 am

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 /
Chính xác rồi đó bạn, mình có viết hướng dẫn chi tiết ở đây nè:
http://forum.joomlaviet.info/threads/7154/
Unlocking Joomla's Potential: Insights, Tips, and Trends: https://hawktemplates.com/blog

phattrienweb
Joomla! Intern
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

Post by phattrienweb » Thu Jul 04, 2013 4:11 am

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.

minhtam
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Jul 12, 2013 3:49 am

Re: Loại bỏ /index.php trong addon domain

Post by minhtam » Sat Jul 13, 2013 1:10 am

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é!

tintuclamdep
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Wed Sep 12, 2012 6:22 am
Contact:

Re: Loại bỏ /index.php trong addon domain

Post by tintuclamdep » Mon Jul 15, 2013 12:04 pm

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


Locked

Return to “Cài đặt - Cấu hình”