4

This is a real novice question regarding .htaccess files. I have read up on it but I really have no clue.

We have a site called originalsite.com.au that is redirecting to www.examplesite.org.au (see below). When I take the comment out, it redirects fine, when I put the comment back in it goes to a blank page and not back to the originalsite homepage.

I want originalsite.com to point the original home page now. I know the originalsite homepage is there because when I use the IP address instead of the URL it goes to originalsite home page.

I obviously don't understand how .htaccess works. Any help would be appreciated.

##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{SERVER_PORT} !=443
#RewriteRule ^ https://www.examplesite.org.au%{REQUEST_URI} [R,L]<== COMMENTED OUT BY AQ TO STOP REDIRECT
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesnt directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesnt directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
3

You are commenting out the RewriteRule to the examplesite.org.au site, but before the rewriteRule you have the RewriteCond for the Server_Port, which lefts orphaned and looks to be the issue here. So, comment out also the line above.

Actually, I would suggest you to use a fresh htaccess file now. You can download a fresh Joomla package that contains the default htaccess.txt, upload it to your server, rename it to .htaccess and replace your old one.

Furthermore, keep in mind that you can use the htaccess to strengthen up the security of your site. You can install Akeeba Admin Tools pro (paid) that contains an htaccess maker feature, to produce an enhanced .htaccess file (strongly recommended).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.