Jump to content

htaccess help please


jokerfool

Recommended Posts

My host recently updated to php5 and I am having some issues on my site.

 

When a user visits a link e.g. blahabc.com/abc they're referred automatically to my default 404 page, thus the user now has to add the index.php extension after abc making it blahabc.com/abc/index.php

 

Now in my htaccess file is it possible to write something in there so when a user goes to blahabc.com/abc they're redirected to blahabc.com/abc/index.php?

 

Thank you.

Link to comment
Share on other sites

If a user goes to the wrong path or even a path with just a folder .com/abc then at the moment they're redirected to my default 404 page which is fine.

 

What I wont to know is in the .htaccess file is there a command I can add so if a user goes to .com/abc then they're redirected automatically to .com/abc/index.php and not sent to the 404 page?

Link to comment
Share on other sites

But if I want the user to go to domainname/software and want the contents of the software folder to load how do I do this in the htaccess file?

 

Do I add Directory Index software/index.php

 

Because since the host updated to php5 when i go to domainname/software I get redirected now to my default 404 page, which is not what I want. If I want to load the contents of the software folder I now have to type in domainname/software/index.php

 

I want to know if there is a shortcut I can place in the htaccess file so if a user does just go to domainname/software then it will load the contents because the htaccess file says something like " If user visits domainname/software* >> domainname/software/index.php

 

Possible?

Link to comment
Share on other sites

Directory Index index.php

 

put it here

 

domainname/software/.htaccess

Directory Index needs to be one word:

DirectoryIndex index.php

 

However I would recommend you to have a word with your hosts about this though. Maybe they forgot to add index.php to the DirectoryIndex.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.