简体   繁体   中英

How to fix my htaccess, it's redirecting my pages all to one index

I was on live chat with my domain support and they managed to delete the default htaccess file, now every url entered goes to my main index, what can I do to fix this?

Example: domain: example.com

If I have a folder under example.com/folder and go to it, the index for example.com shows instead of for that folder and if I put the path directly it stays in the browser but it shows the index for example.com always.

What can I write in my htaccess to fix this to how it used to be and keep mod rewrite enabled?

Edit: also, every time I've asked them to fix it or reset it to default they claim that it's a web development issue and not theirs. All they do is tell me to contact my developer.

hopefully, it works

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#This last condition enables access to the images and css folders, and the robots.txt file
RewriteCond $1 !^(index\.php|public|images|robots\.txt|css)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM