Pretty URLs not working
Permalink 1 user found helpful
Hello everyone,
We've tried and tried to get the pretty URL's working on the new Concrete version of our sitehttp://stage.senior-focus.com but to no avail. We've used the .htaccess script provided in the latest version of Concrete5 and written "define('URL_REWRITING_ALL', true);" into the config file. I've seen lots of old forum posts about this issue, but many have said those issues have been resolved in the new versions of Concrete5. Also, the mod_rewrite is active and working on the server.
Please help!
We've tried and tried to get the pretty URL's working on the new Concrete version of our sitehttp://stage.senior-focus.com but to no avail. We've used the .htaccess script provided in the latest version of Concrete5 and written "define('URL_REWRITING_ALL', true);" into the config file. I've seen lots of old forum posts about this issue, but many have said those issues have been resolved in the new versions of Concrete5. Also, the mod_rewrite is active and working on the server.
Please help!
My bad, the correct link is:http://stage.senior-focus.com
Did you enable Pretty URLS in Concrete5?
Go to Dashboard > SEO & Statistics > Pretty URLs
Then check Pretty URLs.
Try that first.
Go to Dashboard > SEO & Statistics > Pretty URLs
Then check Pretty URLs.
Try that first.
Yes, that has been done.
Hey guys, still not working, any ideas?
FYI, we're running CloudLinux with Apache on a Plesk GUI platform.
FYI, we're running CloudLinux with Apache on a Plesk GUI platform.
After a little research, I found that you can add
to you site.php file. That file is found in your config directory. Try that.
define('URL_REWRITING_ALL', true);
to you site.php file. That file is found in your config directory. Try that.
We've already got that in place.
In your original question you said that you put it in your .htaccess script. I am referring to the site.php file in the config folder. Is this what you meant by the .htaccess script?
Hey there, no that's not what I meant. I put the recommended script (by Concrete when activating pretty URL's) in the .htaccess file. That is below:
<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>
I put this code:
define('URL_REWRITING_ALL', true);
in the site.php file in the /config folder as you suggested.
All of that was in place before I put the post on the forum and is where I am at with the issue currently. I believe if these things are done, this the pretty URL's should work with this version of Concrete.
<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>
I put this code:
define('URL_REWRITING_ALL', true);
in the site.php file in the /config folder as you suggested.
All of that was in place before I put the post on the forum and is where I am at with the issue currently. I believe if these things are done, this the pretty URL's should work with this version of Concrete.
Hmm. I am not sure about this. It could be a bug in C5. You could try reporting it here:http://www.concrete5.org/developers/bugs/5-6-1-2/...
Ok, by design the .htaccess file rewrites those, but does not redirect those. That is how it is intended to work at this time.
So if I understand correctly, you are trying to "redirect" from
to
Meaning that if someone types the first one into the browser they will get redirected to the second. You might want to bring that up in the Beta Forum for consideration in a future version.
Best Wishes,
Mike
So if I understand correctly, you are trying to "redirect" from
http://example.org/index.php/some-page
to
http://example.org/some-page
Meaning that if someone types the first one into the browser they will get redirected to the second. You might want to bring that up in the Beta Forum for consideration in a future version.
Best Wishes,
Mike
Worked like a charm "remove index.php from URLs"
Hello,
Unfortunately, there can be some variation with various servers and the pretty url .htaccess code. To confirm, is the problem like this?
Does not work but the one below does?
Best Wishes,
Mike
Unfortunately, there can be some variation with various servers and the pretty url .htaccess code. To confirm, is the problem like this?
http://example.org/my-page
Does not work but the one below does?
http://example.org/index.php/my-page
Best Wishes,
Mike
Not exactly sure what you're asking, but if you are asking if the "/index.php" is showing up in our URL's when pretty url's is enabled, then yes, that is correct.
________________________________________
From: concrete5 Community [discussions@concretecms.com]
Sent: Saturday, May 18, 2013 7:33 PM
To: Justin Queen
Subject: Pretty URLs not working : Editing with concrete5
________________________________________
From: concrete5 Community [discussions@concretecms.com]
Sent: Saturday, May 18, 2013 7:33 PM
To: Justin Queen
Subject: Pretty URLs not working : Editing with concrete5
Actually, no what I was asking is if the link doesn't work or if you are seeing links that have the index.php in it.
If
and
Both work then your .htaccess file is working as intended.
If that is the case can you be a bit more specific about where you are seeing links that contain index.php where you would rather they didn't?
Best Wishes,
Mike
If
http://example.org/index.php/some-page
and
http://example.org/some-page
Both work then your .htaccess file is working as intended.
If that is the case can you be a bit more specific about where you are seeing links that contain index.php where you would rather they didn't?
Best Wishes,
Mike
I am seeing the links with the "/index.php" manually removed work just fine. (Such ashttp://stage.senior-focus.com/senior-web-experts/)....
What needs to be done to make the links called into the URL with "/index.php" dynamically resolve only to the pretty URLs?
Thanks,
Justin
________________________________________
From: concrete5 Community [discussions@concretecms.com]
Sent: Saturday, May 18, 2013 7:54 PM
To: Justin Queen
Subject: Pretty URLs not working : Editing with concrete5
What needs to be done to make the links called into the URL with "/index.php" dynamically resolve only to the pretty URLs?
Thanks,
Justin
________________________________________
From: concrete5 Community [discussions@concretecms.com]
Sent: Saturday, May 18, 2013 7:54 PM
To: Justin Queen
Subject: Pretty URLs not working : Editing with concrete5
Just at quick glance, it appears your .htaccess is set to write pretty url's for your main domain but not for the subdomain you're using ?
Hello,
The main domain site is not on the Concrete platform. The sub-domain htaccess is in Concrete. The .htaccess file is also set in the subdomain and will write pretty URLs if entered manually in the address bar, but will not rewrite them automatically when navigation item in website is called or clicked.
The main domain site is not on the Concrete platform. The sub-domain htaccess is in Concrete. The .htaccess file is also set in the subdomain and will write pretty URLs if entered manually in the address bar, but will not rewrite them automatically when navigation item in website is called or clicked.
I am postign here and in dev...
I am having the same problems.
Updated the dev version from git just incase someone fixed this bug, so running at latest.
.htaccess #1
<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>
.htaccess #1
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
</IfModule>
site.php #1
<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'dbname');
define('PASSWORD_SALT', 'v....WlP');
site.php #2
#added
define('URL_REWRITING_ALL', true);
site.php #3
#added
define('SERVER_PATH_VARIABLE', 'REDIRECT_URL');
site.php #4
#added
define('URL_REWRITING_ALL', true);
define('SERVER_PATH_VARIABLE', 'REDIRECT_URL');
both .htaccess files had the same results
When I turn Pretty URL's ON it removes the index,php and EVERYTHING BREAKS (i.e. page not found)
This is the case with both .htaccess files and all site.php files
In addition, I have to restore a backed up copy of the database to get the site back into Pretty URL's=OFF state as I no longer have access to the dashboard.
Has anyone come up with a working .htaccess (or even better, nginx.conf) solution? or is this a code issue?
I am having the same problems.
Updated the dev version from git just incase someone fixed this bug, so running at latest.
.htaccess #1
<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>
.htaccess #1
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
</IfModule>
site.php #1
<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'dbname');
define('PASSWORD_SALT', 'v....WlP');
site.php #2
#added
define('URL_REWRITING_ALL', true);
site.php #3
#added
define('SERVER_PATH_VARIABLE', 'REDIRECT_URL');
site.php #4
#added
define('URL_REWRITING_ALL', true);
define('SERVER_PATH_VARIABLE', 'REDIRECT_URL');
both .htaccess files had the same results
When I turn Pretty URL's ON it removes the index,php and EVERYTHING BREAKS (i.e. page not found)
This is the case with both .htaccess files and all site.php files
In addition, I have to restore a backed up copy of the database to get the site back into Pretty URL's=OFF state as I no longer have access to the dashboard.
Has anyone come up with a working .htaccess (or even better, nginx.conf) solution? or is this a code issue?
I had the same problems, as have many other I see... and what fixed it was..
changing the
AllowOverride None
to
AllowOverride All
in the sites config file
changing the
AllowOverride None
to
AllowOverride All
in the sites config file
Thanks. It helps to turn Rewrite on :)
Ntisithoj,
Were you referring to the /config/site.php file to change the AllowOverride to all?
I'm not finding that in the file.
Were you referring to the /config/site.php file to change the AllowOverride to all?
I'm not finding that in the file.
Me neither! I'm still having this problem... Hope some one got an answer. There are 2 files in my config folder: site.php and site_theme_paths.php
He ment he changed the AllowOverride None to AllowOverride All in the httpd.conf (sites-available/default in my case)
This are the config files for your server (ea Apache or nginx)
usually found in /etc/apache2/
Excample of mine:
items between ** ** are variable and changed for privacy
This are the config files for your server (ea Apache or nginx)
usually found in /etc/apache2/
Excample of mine:
items between ** ** are variable and changed for privacy
<VirtualHost *:80> # ServerName **url of site ea www.test.com ** ServerAdmin webmaster@localhost DocumentRoot ** location of your website ea /var/www/ ** <Directory ></Directory> Options FollowSymLinks AllowOverride None </Directory> <Directory ** location of your website with extra / ea /var/www// **> Options Indexes FollowSymLinks MultiViews AllowOverride All <<============================== Here it is!! Order allow,deny allow from all RewriteEngine On
Viewing 15 lines of 38 lines. View entire code block.
This is what I was missing!
Server crash and I forgot how I had Apache2 set up. This so far was my only unsolvable issue, till now!
Server crash and I forgot how I had Apache2 set up. This so far was my only unsolvable issue, till now!