Hi I just seen that many people are recommending that there should not be 2 same pages on different names like domain.com/index.php and domain.com So i want to redirect my domain.com/index.php to domain.com Anyone please give me a redirect which i can add in .htaccess Thanks in advance !!
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php HTTP/ RewriteRule ^index\.php$ http://www.yourdomain.com/ [R=301,L] Code (markup): enjoy
thanks for that but its not working may be because my prior .htaccess data here is the text which is in my .htaccess RewriteEngine On RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L] RewriteEngine on RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] Code (markup): I just added your code but its giving 500 internal error please help Thank you again
Bro i don't want to show my site here thats why i renamed to domain.com this does not work - try it yourself now who's silly
Ok let me show you how is my .htaccess file RewriteEngine On RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L] RewriteEngine on RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php HTTP/ RewriteRule ^index\.php$ http://www.domain.com/ [R=301,L] Code (markup): 1st line is of my sitemap 2nd is of redirecting my URL to www version and 3rd one is the one you gave me Is this in a correct manner ? My apache showed 500 internal error I think i am going wrong with the proper format of this rewrite rule Thanks for your help till now
Just PM me the site URL and all this code; I'll format it properly for your site URL so it's correct.