We have our old site into core PHP and we have developed it again into Joomla 1.5 last year (because of some limitations we have to build it into 1.5). Now the problem is the URL of sites changed as we have use SEO URLS on Joomla.
In between we have use .htaccess to redirect user from old URL to new like this
Redirect /pages/oldpage.php http://www.mydomain.com/products/category/new_page.html
Is this good practice to redirect user to new URL or not?(we have used same server).
One more thing, We have used splash page on our site, and to set up it we have made some changes and because of it one of the important link is not working, and it is
http://www.mydomail.com/index.php
How can I get rid of it? I have used DirectoryIndex splash.html home.html index.php
in .htaccess to open splash page first when someone open my site www.mydomain.com
.
Note: my website hosted on dedicated Ubuntu server.
EDIT: As mentioned I use Joomla and I have enabled SEF facility into it and it has already written .htaccess as per below (as I do not understand it much).
DirectoryIndex splash.html home.html index.php
RewriteEngine On
########## 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!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
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]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
Redirect /pages/oldpage.php http://www.mydomain.com/products/category/new_page.html
.....................
.................
index.php
does not work - what happens exactly?RewriteRule ^(.*)$ index.php [F,L]
- this would appear to unconditionally rewrite all URLs toindex.php
and return a 403 Forbidden?! I would have expected someRewriteCond
directives before this?/index.php
does actually exist?