.htacces pretty url problems

Hi guys,

So this is my problem. I turned on pretty urls and this worked it rewrote my urls through the .htacces file. But this caused another problem. This made it unable to login into the backend of the site. It rewrote all my login etc.

So I put index.php behind the URL i hear you say. So I tried and it gave me the login form. Sweet, but when I logged in I couldn't reach te dashboard. Not even when I putted the index.php behind the URL.

So I think that in the login it still submits to index.php/login/authenticate/concrete except for the /login/authenticate/concrete.

I hope you can understand the question and hope you can help me with this.

Kind regards,


View Replies:
BearJerCares replied on at Permalink Reply
Hi, I wonder why no one responded to help. I have the same issue. Did you resolve your issue? There is a warning about not using that option without knowing whether it will work, but the documentation is less than clear. It states you might have to change it manually if it doesn't work. I assume it must mean we have to edit the htdocs/.htaccess file? Oh well, I will just re-install and not use the PRETTY URLs until I understand what I need to do.

Jerry in Michigan
HMcCarthy replied on at Permalink Reply
I'm not a backend-developer by any means, but I found somewhere that I should have this (the code below) in my .htaccess. I have pretty urls on (remove index.php) and can still login without the /index.php and have access to my dashboard. It all behaves normally. I share this hoping maybe there the difference between working and not working properly might lie in the code below. Let me know if it makes a difference and I'll be sure to continue using it on my subsequent sites.

Best of luck!

<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]
jero replied on at Permalink Reply
When you turn on pretty URLs, concrete5 tries to update your .htaccess file as per the example supplied by @eriset. It is sometimes the case that your webserver is unable to write to the .htaccess file, in which case unless you edit it by other means (ftp, cpanel etc) you will get the symptoms you describe. There is a warning if the write fails but this is easily missed.

Make sure .htaccess exists and has the required content.
BearJerCares replied on at Permalink Reply
Thanks eriset and jero. Re: the pretty URLs, I ended up just re-installing my Concrete5 software because the instructions I found in the forums and elsewhere were not clear enough that I wanted to fool around with it. I will not have Concrete5 in a production environment for sometime, so I can get along with ugly URLS for now.

Regarding the system looking for .htaccess, it is NOT going to find it with most Linux systems, as far as I know, because the default for the APACHE website directory is /var/www/html - there is no .htaccess. And besides that, some of the Windows-based Apache configurations are set up with xampp/www, so unless there is an IF, THEN, ELSE or something built in, I would imagine lots of people have problems in this area, but not being proficient in programming, maybe something else takes place behind the scenes to correct the issues in the majority of cases.

So, for now, I do NOT plan on using PRETTY URLs until I find out EXACTLY what I need to do or not do to correct any issues that arise. Thanks for the responses. Jerry in Michigan
jero replied on at Permalink Reply
The correct place for your .htaccess file is the folder where all of your concrete5 files are located. Where that folder actually resides depends entirely on how your web server is configured. That's not really important though - just make sure .htaccess is in the same folder as index.php, and the concrete, application folders and all should be well.
BearJerCares replied on at Permalink Reply
I guess I didn't state it clearly enough, but I'm quite sure that .htaccess is NOT found at all in many Apache server configurations on both Windows and especially Linux systems. And if that file needs to be created before PRETTY URLs are enabled, should .htaccess be created as a "blank" file, or does the code mentioned above have to be manually placed there in the .htaccess file? Also, I guess in Unix-type systems, the PERIOD . means it is hidden, so people should also be instructed to show all hidden files to determine if .htaccess is present in their server's main directory.

So, in my opinion, the instructions relating to the pretty URLs being enabled are a bit deficient for a beginner. Hopefully, this explains it better, at least from my perspective as a Concrete5 beginner. Thanks, Jerry in Michigan