.htaccess file for 5.7

Permalink
Hello,

I backup up the files and db for a site I was working on, but apparently I forgot to turn off pretty urls first. I went to re-upload it, and none of my linking works. This sort of thing has happened before and I just made a new backup without pretty urls. The problem is that site is gone, and this backup is all I have left.

I figured I could edit the .htaccess file myself, but I can't seem to find it. Did they change the name of this file? Or does it not exist in 5.7?

Thanks,
Kurtopsy

Kurtopsy
View Replies:
Steevb replied on at Permalink Reply
Steevb
If you do not have an 'htaccess' file, create one. Then try pasting in code below and see if it helps.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /version/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
Kurtopsy replied on at Permalink Reply
Kurtopsy
Hi Steevb,

Thanks for this. I added and uploaded it, but to no avail. The 500 internal server error is still being triggered due to the lack of index.php in the url. If I add the index.php in the url it works. Any ideas?
Kurtopsy replied on at Permalink Reply
Kurtopsy
**FIXED**

I found the fix for this on a different thread. Courtesy of AndyJ.

/application/config/generated_overrides/concrete.php

there should be a section in that file for SEO

'seo' => array(
'url_rewriting' => 1
)

edit this to 0.

This should turn url_rewiting off but it won't edit your .htaccess

you'll need to edit that and remove the section:

# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
# -- concrete5 urls end --

I did all that, and it brought it back to as if pretty urls were never enabled.
Steevb replied on at Permalink Reply
Steevb
Good news.
MorganBeck replied on at Permalink Reply
I had this same issue and followed the above steps (manually setting the 1 <yes it was 0>) and resolved my issues.

Thanks!!
daenu replied on at Permalink Reply
daenu
SideNote:
Editing the config file over the dashboard is more reliable. System & Settings -> SEO & Statistics -> URLs and Redirection
Kurtopsy replied on at Permalink Reply
Kurtopsy
I'm aware, but it wouldn't let me past the login screen due to stuff conflicting with the dashboard thinking that pretty urls was enabled and the code thinking it was disabled. So I had to make the edit above to get to the dashboard, then disable and enable pretty urls.