2014-01-29 31 views
1

我需要重寫joomla中特定組件的url,以便實際組件名稱在url中不可見。重寫joomla中的htaccess

E.g的index.php?選擇= com_mycomponent

我需要更換com_mycomponent到XYZ

而且我安裝joomsef擴展,但不工作的Joomla罰款語言過濾器插件。

所以我需要使用htaccess的

改寫爲特定組件的URL

所以,請建議我適當的解決方案儘快

+1

中的Joomla一些組件!需要您的網址輸入才能正常運作;如果URL中有POST數據,那麼該組件在重寫後可能無法工作。你能說出你想要掩蓋的組件或擴展嗎? – Ross

+0

我已經創建了一個自定義組件com_jrestaurantreservation,並且我需要重寫該擴展的網址以保留原樣 – user2469730

回答

0

您是否嘗試過基本的.htaccess重寫?基本的重寫引擎不應該太強悍:

RewriteEngine On # Turn on the rewriting engine 
RewriteRule ^my_component_pretty_url$ ?option=com_mycomponent [NC,L] 

如果有人有更好的重寫規則,請添加...我的超級基本。

+0

感謝您的回答。但不幸的是,它不起作用 – user2469730

0

試試這個,

RewriteEngine On 
RewriteRule ^chaletreservation$ index.php?option=com_jrestaurantreservation  [QSA,L] 
RewriteRule ^chaletreservation(.+)$ index.php?option=com_jrestaurantreservation&$1 [QSA,L] 

然後簡單地使用在任何你需要這個組件的URL index.php?option=com_jrestaurantreservation像下面,

www.yourdomain.com/chaletreservation 

希望其作品..