I have a site at http://www.mradlmaier/bplaced.net
The site resides in the subdirectory /joomla25-development/ (It is a Joomla site).
Now I am want a couple of things:
- have http://www.mradlmaier/bplaced.net redirect to http://mradlmaier/bplaced.net so that search engines dont see it as duplicate content.
- redirect access to the root to the subdirectory http://www.mradlmaier/bplaced.net/joomla25-development/
- but have the subdirectory name hidden in the address bar of the browser
So the first 2 things work:
So when I request http://www.mradlmaier/bplaced.net, I will land correctly http://www.mradlmaier/bplaced.net/joomla25-development/ and the browser displays http://mradlmaier/bplaced.net
However, if I click any link, the redirect still works, but the subdirectory name shows up in the browser:
http://www.mradlmaier.bplaced.net/joomla25-development/index.php/blog
instead of:
http://www.mradlmaier.bplaced.net/index.php/blog
or
http://www.mradlmaier.bplaced.net/blog
Here is my .htaccess:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mradlmaier.bplaced\.net$ [NC]
RewriteRule ^(.*)$ http://www.mradlmaier.bplaced.net/$1 [R=301,L]
# .htaccess primary domain to subfolder redirect
# Copy and paste the following code into the .htaccess file
# in the public_html folder of your hosting account
# make the changes to the file according to the instructions.
# Do not change this line.
RewriteEngine on
# Change yourdomain.com to be your primary domain.
RewriteCond %{HTTP_HOST} ^(www.)?mradlmaier.bplaced.net$
# Change 'subfolder' to be the folder you will use for your primary domain.
RewriteCond %{REQUEST_URI} !^/joomla25-development/
# Don't change this line.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change 'subfolder' to be the folder you will use for your primary domain.
RewriteRule ^(.*)$ /joomla25-development/$1
# Change yourdomain.com to be your primary domain again.
# Change 'subfolder' to be the folder you will use for your primary domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?mradlmaier.bplaced.net$
RewriteRule ^(/)?$ joomla25-development/index.php [L]
Can anyone please advice?
Bookmarks