5.7.5.2 - Pretty Urls Disaster
Permalink 2 users found helpfulProblem: Had a nearly completed website, attempted to enable Pretty Urls and mod .htaccess, etc. Now I can only see the /index.php and /login pages - if I click a link on index.php or sign in, I receive a nice 404;
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404
Question: Of course, *now* I read all of the people who have had difficulty with this feature. Of course, my last backup was just after Concrete5 was installed. Everything was nearly perfect until I decided to try Pretty Urls. I just want to go back to have a working site (forget pretty urls - I'd rather have a working site!); but I don't see it documented for 5.7. I have undone most of the changes I made outside the admin dashboard - however I don't know what to modify within mysql/concrete5 by hand when there is no admin dashboard available. Does anyone have any ideas on how I can go back?
path: application/config/generated_overrides/concrete.php
You can also try this:
1. Login sitename.com/index.php/login
2. Go to the dashboard sitename.com/index.php/dashboard
3. edit the settings for the removal of index.php
),
'seo' => array(
'canonical_url' => 'http://www.mydomain.com',
'canonical_ssl_url' => '',
'redirect_to_canonical_url' => 0,
'url_rewriting' => 0,
http://www.mydomain.com/index.php/mypage...
I can see the pages fine. However all links are broken due to the removal of index.php. An no matter what I try, I can not seem to get past a token error after attempting to login to the dashboard.
Kevin
'seo' => array(
'canonical_url' => 'http://localhost/myurl',
'canonical_ssl_url' => '',
'redirect_to_canonical_url' => 1,
'url_rewriting' => 0,
'tracking' => array(
'code' => '<script>
Then i was able to log in and click on links.
I also changed my cache settings and cleared my cache.
Anyone who has another solution?
Thanks!
I have done this process successfully many times, but for some reason this time it's causing an issue.
I have a site just about ready to go live and was just tweaking things but now unable to login.
Any assitance please?
I put a fresh C5 install and still had the problem, so next step is looking at the server environment
https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_r...
I only added the entry they cited to 000-default.conf.
And, I think (so far) pretty urls works now.
Just go into applications\config\generated_overrrides/ folder
In the concrete.php file look for the this section of code and deleted it.
'seo' => [
'redirect_to_canonical_url' => 0,
'url_rewriting' => true,
],
Then clear your browser catch and login back in. The site should come back up and pretty URL is now turned off.
I have the same issue, also of course shortly before going live with a site.
here's what my .htaccess (placed in the root folder of concrete5) looks like.
<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>
and here's an excerpt of application/config/generated_overrides/concrete.php
'seo' => array( 'canonical_url' => '', 'canonical_ssl_url' => '', 'redirect_to_canonical_url' => 0, 'url_rewriting' => 0,
has anyone solved this without having to do a clean install? my client already has his content on this site :/
1. Backup and then delete the .htaccess file in the root folder of the faulty installation
2. Replace /application/config/generated_overrides/concrete.php with the file from my working development environment.
The 'seo' Part in said file now looks like this.
'seo' => array( 'canonical_url' => '', 'canonical_ssl_url' => '', 'redirect_to_canonical_url' => 0, 'url_rewriting' => 0, ),
That was super scary. I will now try switching Pretty URLs (url_rewriting) back on.
1. You need to follow the steps posted by publicb and then the site will return to normal.
2. Then, to actually turn on pretty URLs, you need to go into system settings and turn off all cache settings. This is really important.
2. Once you do so, attempt to turn on pretty URLs again in the system settings, and it should work.
3. If the settings page generates code for you to paste into your .htaccess file, be mindful to only copy the version for your server type.
You can remove the following from the .htaccess
# -- 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 --