Aghhhhhhh! I need to 301 index.php to / as Google has indexed both index.php and / I put the code needed and it worked apart from the shopping cart then redirected to / Site info: Joomla Virtuemart sh404SEF Now all pages return a 404 except root as in my frustration i deleted everything in .htaccess to try and resolve the problem with new code, now its a non functional website! Please help anyone urgent, thanks.
OK I got the original code back in .htaccess now site is working. My issue is this 301 from index.php to www. mydomain.com i put the necessary code in .htaccess and works fine except then the shopping cart redirect's to the home page........anyone ? I was Googling to try and solve this problem and this thread is indexed within a few hours, amazing.
If the following works in your root-level directories' htaccess (after altering domain.com or course), I sent you a link via PM you can attend to however you want. RewriteEngine On RewriteRule ^(.*/)?index\.php$ http://domain.com/$1 [QSA,R=301] Code (markup): Otherwise, I want to see every htaccess you have active before suggesting anything else. On my own box I have an SEO mod active for phpBB3 that conflicts with this, I don't want to piss into the wind if you have somthing similar going.
That didn't work thanks anyway. I got this message "The page isn't redirecting properly" The code below I believe is created by sh404SEF which is installed on my site for friendly url's. So this is what is in .htaccess below: # # mod_rewrite in use # RewriteEngine On # Uncomment following line if you get 403 Forbidden Error #Options +FollowSymLinks # Uncomment following line if your webserver's URL # is not directly related to physival file paths. # Update YourMamboDirectory (just / for root) #RewriteBase /YourMamboDirectory # # Rules # #RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) index.php Code (markup):
Alright, I just installed the three to make this easier. My setup looks like this. http://domain.com/ http://domain.com/Joomla/ I have the following in http://domain.com/Joomla/.htaccess ## Can be commented out if causes errors. Options +FollowSymLinks # # mod_rewrite in use # RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes## RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC] RewriteRule ^(content/|component/) index.php ########## Begin - Rewrite rules to block out some common exploits ## If you experience problems on your site block out the operations listed below ## This attempts to block the most common type of exploit `attempts` to Joomla! # # Block out any script trying to set a mosConfig value through the URL RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR] # Block out any script trying to base64_encode crap to send via URL RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR] # Block out any script that includes a <script> tag in URL RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] # Block out any script trying to set a PHP GLOBALS variable via URL RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] # Block out any script trying to modify a _REQUEST variable via URL RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) # Send all blocked request to homepage with 403 Forbidden error! RewriteRule ^(.*)$ index.php [F,L] # ########## End - Rewrite rules to block out some common exploits RewriteCond %{REQUEST_URI} !administrator/index\.php$ RewriteRule ^(.*/)?index\.php$ http://domain.com/Joomla/$1 [QSA,R=301] Code (markup): I had to enable sh404SEF in site -> Global Configuration -> SEO (Tab) -> "Search Engine Friendly URLs" Code (markup): After enabling that, I had to enable it further in Components -> sh404SEF -> sh404SEF Configuration -> Main (Tab) -> "Enabled?" Code (markup): How about that ?
No joy, thank you for your efforts anyway. I sent you a PM with URL, if we find a solution I will post it here.