PDA

View Full Version : Category Path in URL question (mod_rewrite)


translateany
12-05-2005, 11:32 PM
I have an extra domain name parked to my current hosting, and redirected to a sub-directory. I have installed phplinkdirectory on that directory, and have written the mod_rewrite rule as follows:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.myextradomain.com$
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteRule ^(.*)$ /subdirectory/$1

When, I invoke http://www.myextradomain.com, http://www.mydomain.com/subdirectory/ runs.

However, each time I click on the following text link, the url shows my base url path as http://www.myextradomain.com/subdirectory/ not as http://www.myextradomain.com:

"Submit Link | Latest Links | Top Hits"

For example, when I click on "Submit Link", the following appears on the url address bar:
http://www.myextradomain.com/subdirectory/submit.php

I need it to appear as:
http://www.myextradomain.com/submit.php

I would like not to show the whole path redirected to.

What would be the easiest and the most efficient way to make a change to eliminate the whole path from the mod_rewrite, and show only the new set-up domain instead?

I would very much appreciate if someone can help on this matter.

Many thanks in advance.