0

i did a .htaccess edit to add index.php after my domain as: [skynetbd.net/index.php][1].


i used:

 RewriteCond %{HTTP_HOST} ^(www\.)?skynetbd\.net
 RewriteCond %{REQUEST_URI} !^/index.php
 Rewriterule ^(.*)$ /index.php/$1 [L]

But unfortunately all of my links redirects to skynetbd.net/index.php like a loop !! please give a solution to prevent this problem..

Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85
Tahasin
  • 338
  • 1
  • 11
  • forgive me but I do not understand the problem, I was also on the site but I do not see anything unusual, could you explain it better? – Gianfrancesco Aurecchia Feb 08 '18 at 11:37
  • actually i removed the code for now. problem is ..when i am using it ..all of my links like skynetbd.net/service.php skynetbd.net/contact.php are redirecting to index.php page !! i also used there: – Tahasin Feb 08 '18 at 11:45
  • Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteCond %{THE_REQUEST} /user_profile/([^.]+)\.php [NC] RewriteRule ^ /%1 [L,NC,R=301] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}/user_profile/$1\.php -f [NC] RewriteRule ^([^.]+?)/?$ user_profile/$1.php [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}/$1\.php -f [NC] RewriteRule ^([^.]+?)/?$ $1.php [NC,L] – Tahasin Feb 08 '18 at 11:47
  • or can you please solve the problem for me: https://stackoverflow.com/questions/48657691/htaccess-editing-to-hide-folder-from-url-accessing-main-domain – Tahasin Feb 08 '18 at 12:06
  • Which code are you currently using in your htaccess the code you posted above in the question body or the code you posted in comments? – Amit Verma Feb 08 '18 at 12:13
  • i am using the code of my comment currently to hide a folder from the url. please have a look.. https://stackoverflow.com/questions/48657691/htaccess-editing-to-hide-folder-from-url-accessing-main-domain – Tahasin Feb 08 '18 at 21:08

0 Answers0