Forum Moderators: phranque
i'm a newby here and I really am impressed by this forum. Hope you can help me too.
I have a small problem and don't know how to fix it:
i have a phpBB2 based forum in the directory www.mysite.com/phpBB/ and a portal.php in the www.mysite.com.
Using .htaccess file I have managed to make it such that when i hit "www.mysite.com" in the address bar, I am redirected to www.mysite.com/portal.php, but the adress bar remains "www.mysite.com" (portal.php doesn't appear).
I wrote something like
DirectoryIndex portal.php index.html
I would like to do this with all the files (even the phpBB2 indexz.file ), i.e. if I get to the www.mysite.com/phpBB/index.php?sid=true3212341 file I want the address bar to still show only www.mysite.com
Is it possible? How?
What you have done is to redefine the default page served when a request is made to your domain name.
Can the address bar made to display www.mysite.com for all pages at your site? Probably, but I don't know how to do it! :)
I don't think it's a good idea for a couple reasons, users will only be able to bookmark the home page, not specific discussions, and I suspect search engines will only index the home page of the site. Is this really what you want?
RewriteCond %{REQUEST_URI} ^/phpBB(.*)$
RewriteRule .* http://www.mysite.com/index.html [R]
RewriteRule ^index.html$ /phpBB%1 [L]
If somebody requests something from the phpBB directory, redirect them to mysite.com's index.html file first. That changes the URL in the browser's Address bar. Then use an internal redirect to direct the visitor to the requested page.
One way to find out it to view the properties for an image. It will tell you the exact url if you right click and select properties. You can then paste the url into your address bar and remove everything after the .tld section.
Mack.