.htaccess RewriteRule 's

Forum closed, please submit your tips and tricks to: http://docs.joomla.org/Category:Tips_and_tricks
Locked
felixkat
Joomla! Intern
Joomla! Intern
Posts: 70
Joined: Sun Oct 28, 2007 2:07 pm

.htaccess RewriteRule 's

Post by felixkat » Sat Mar 22, 2008 11:57 pm

Hi all,

I could only find a couple of posts with this site mentioned in it. I thought it would be helpful to place this in Tips & Tricks.

The following is a fantastic site when it comes to doing rewrites in your .htaccess files. There are so many posts that's it's likely you would find an example of what you need.

http://forum.modrewrite.com/

I only had a simple rewrite to perform but there are some really complex ones on there.


I have http://www.adomain.com but installed Joomla in http://www.adomain.com/Joomla. I wanted however people to be able to go to http://www.adomain.com but see the contents of http://www.adomain/Joomla. I wanted also for this to be masked...

Example:-

Instead of people seeing

www.adomain.com/Joomla/Forums they would see www.adomain.com/Forums

I have this running with Search Engine Friendly URL's ON.

You do however need to mark your live site as var $live_site = 'http://www.adomain.com';

This also works on a populated site.

Hope this helps somebody.

User avatar
trichnosis
Joomla! Explorer
Joomla! Explorer
Posts: 315
Joined: Wed May 17, 2006 4:15 pm

Re: .htaccess RewriteRule 's

Post by trichnosis » Sat Apr 05, 2008 5:11 pm

what is the rewrite rule for that? :(

felixkat
Joomla! Intern
Joomla! Intern
Posts: 70
Joined: Sun Oct 28, 2007 2:07 pm

Re: .htaccess RewriteRule 's

Post by felixkat » Fri May 02, 2008 12:03 am

trichnosis wrote:what is the rewrite rule for that? :(

Sorry checking old posts and noticed I didn't reply to your question.

The following rewrite code would be placed ina .htaccess file in http://www.adomain.com. Joomla's .htaccess file would be picked up secondary in http://www.adomain.com/Joomla.

As mentioned before though $live_site = 'http://www.adomain.com'; would have to be placed in your configuration.php as Joomla would now think it's in the root and not in a subdirectory.

Code: Select all

RewriteCond %{ENV:REDIRECT_STATUS} ^$ 
RewriteRule ^(.*)$ /Joomla/$1 [QSA,L]


Locked

Return to “Submit Your Suggested Tips & Tricks to Docs.joomla.org now please.”