Topic Closed

Hi everybody,

first of all I'd like to thank the developer(s) of the gp|Easy CMS for this impressive piece of software! Very well done! ;)

I'm really satisfied with the CMS itself except for one thing: I don't like "index.php" being put in front of all the URLs. I quite understand that this might be a necessary feature for servers not supporting any rewrite engine (such as "mod_rewrite" etc) but I think there should really be an option for servers supporting it to get rid of "index.php" being put in front of all URLs.

Due to I installed gp|Easy CMS on such a server, I experimented with several rewrite rules which normally strip out "index.php" from every request (works fine with several other CMS) but for some reasons, they don't work with gp|Easy CMS. It seems to me that there might be some kind of an internal routing feature within the CMS redirecting all request through the index.php file.

So my question is whether there's currently any option/possibility to get rid of "index.php" in the URLs (assuming that the server supports the use of "mod_rewrite")?

Any help is greatly appreciated.

Thank you very much in advance!

Cheers, Eric

Edited: 10 years ago#177

I'll second that, Eric. THe About page has: "SEO Friendly Links" in the list of features.

10 years ago#180

Josh S.
2K Posts
283K Downloads
16 Themes
18 Plugins

I just added this in version 1.6.1. Details/instructions can be found on the documentation wiki.

Let me know how it works,

Thanks for the feedback!

10 years ago#187

Charles S
448 Posts
13.7K Downloads
2 Themes
8 Plugins

I've tried the mod rewrite as you suggest--I'm using a localhost install in a subdirectory--and it does not work. I did not load it to my server to try it. I made sure that the subdirectories were written as you specify to my correct subdirectories, but no go. Possibly upload the exact docs you suggest or download?

As others suggest, removing index.php and setting the home page to the domain would be nice as there is no real need for it in the URL.

As it currently stands you never have the domain name as the home page (index page). An example is: gpeasy.com  = gpeasy.com/index.php/Welcome_To_gpEasy. Not "pretty" URL ;)

It would be best, if possible, if this was by default for users that aren't familiar with mod rewrites as gpEasy is generally very easy to use and I think many users new to the web would really like it. 

Hope that doesn't sound like a "complaint" . . . just a suggestion to make it ultra simple for noob users.

thanks

10 years ago#363

Josh S.
2K Posts
283K Downloads
16 Themes
18 Plugins

I would love to make it default, but it's not possible for a number of reasons.

  • Not everyone's server supports .htaccess files
  • Some servers won't work at all if we include an .htaccess file with mod_rewrite code
  • The mod_rewrite directives very often need to be customized in order for them to work.

With those in mind, are you sure you have mod_rewrite, and did you edit the .htaccess file to match your installation?

10 years ago#366

Charles S
448 Posts
13.7K Downloads
2 Themes
8 Plugins

sucks there isn't a way to be able to make something like this defualt. .  .

 

As for my test on my localhost install.

Yes, I followed your example exactly. That example didn't work--would return a error in line 5 of index.php.

I got it to work before using a different mod rewrite; however, I deleted the files for other testing purposes and of course forgot exactly what I did.

I'm sure the mod rewrite I have on my server will work just fine. The reason I went back and tried your rewrite rules again was, when I did the rewrite and it was working the images broke and when I tried to re-upload them the file manager went wonky--it would just return to the file manager page when I would go to browse for the file and I wanted to be able to re-check that to see if it was a bug or not. 

I'll have to upload to my server and play a little--don't really have the time right now. No worries, just wanted to let you know in case the mod rewrite has a localhost install issue. 

I don't know if this is possible, but can you make a mod_rewrite for the home page to be the domain name (*.com/Home = *.com)?

thanks

**Update**

Found the problem. There seems to be a problem in the code of index.php file for "define('gp_indexphp',false);"

I installed gpEasy into glacier subdirectory and just copied your htaccess & index.php examples and it worked fine. Copied the index.php data over to my other subdirectory index.php file and made the appropriate changes and it works fine now. Must be a ' or something in the index.php file. 

I do have another question, sorry.

I tried to add a "/" at the end of the url, but it breaks gpEasy. I used similar rewrite that works with getsimple CMS. Can you give a rewrite for this or is it not possible? And how do I get the "home" page to = domain name (domain.com = domain.com/home)--is it only via a rewrite/redirect?

Also, off topic, do you plan on adding a feature for meta data (description) for each page in the future?

Edited: 10 years ago#370

Phil Smith
18 Posts
5K Downloads
1 Themes

Could we add a couple of new fields into editing a page in the File Manager?

Right now when we create a page we give it a name. That could be left alone, allowing us to give our files unique filenames.  People who want their homepage to read like a homepage could call it "index", "home", "welcome", etc.  They could still use their .htaccess to remove the initial index.php from the url.

Then, why not add two new fields to the file editor?

1. Page title What you enter here will be added to the browser title. This is pretty important as an SEO feature as well.  Titlebar would then read "Page Title" - "Site Name"

2. Menu title What you enter here will be printed in the menu.

Take a product page as an example:

Filename: "products"

Page Title: "The Finest Tools Available - ToolMan Inc."

Menu Title: "Our Products"

Sorry, I know this is basically a feature request but I think it would help in this case.

10 years ago#371

Charles S
448 Posts
13.7K Downloads
2 Themes
8 Plugins

OH. . . I see that when we change the name of a page it changes the URL. . .that can cause a mess.

 

Update on index.php removal and browser for file on server.

Once the htaccess and index.php have been set to remove index.php from the URL when you browser server to add an image to defaults back to home page, at least on this localhost install. 

Edited: 10 years ago#373

Josh S.
2K Posts
283K Downloads
16 Themes
18 Plugins

Strodtbeck, would you mind posting your mod_rewrite code?

10 years ago#378

Charles S
448 Posts
13.7K Downloads
2 Themes
8 Plugins

Josh, sure.

I've zipped the index.php and .htaccess files together. glacier.zip

PS. . .

Here's the rewrite I used to add a "/" at the end of the url in a test that works with getsimple but not gpeasy. tried a couple other but no go.

Update. .  I've looked into why getsimple automatically has a slash at the end and it's now written into the php code, thus forget the following rewrite code. FYI, getsimple cms does has a nice feature for url modifications (somewhat similar to wordpress)

# used to add a / at the end of url
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !\..+$
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) http://localhost/trueacu/getsimple/$1/ [R=301,L]
Edited: 10 years ago#381

deSoDa
5 Posts

Just to give some quick feedback from a gp|Easy n00b -- following the instructions in the wiki, I used the default .htaccess_example file as is and renamed it to .htaccess on the server, then uncommented the following 2 lines

 

  • define('gp_indexphp',false);
  • define('gp_indexphp_root','/');
changing the /glacier/ directory to root (/) and I had NO issues whatsoever.
 
I am using cPanel through my web host Hostpapa.ca, and it took me 5 mins at most to get rid of the index.php/page_name reference.
10 years ago#421

Josh S.
2K Posts
283K Downloads
16 Themes
18 Plugins

Good to know,

Thanks!

10 years ago#431

Charles S
448 Posts
13.7K Downloads
2 Themes
8 Plugins

DeSoDa,

When you try to insert an image into a page from CKEditor while in edit mode with the htaccess rewrite rules on to remove index.php, can you browse your server to load the image?

I've only been able to test on subfolders and localhost installs and when I browse for an image when inserting  from the CKEditor menu it just goes back to the home page. This only happens with the mod_rewrite on to remove index.php. Works fine when it is not on.

Edited: 10 years ago#462

Andrez
10 Posts

I have a question... Can all of this be done when your website is full of content WITHOUT losing any data or causing disasters, or it must be done BEFORE the gpEasy installation?

10 years ago#539

Charles S
448 Posts
13.7K Downloads
2 Themes
8 Plugins

htaccess rules won't have any effect on your gpEasy data. The mod rewrite rules on redirect request for pages/urls. So, yes you can add htaccess at any point.

However, if you remove index.php from your url and already have many pages then the search engines will still be pointing to the url with index.php in it, thus it is usually best to do your htaccess rules when setting up a site, but you can do it later and either redirect the pages or let the search engines figure it out over time.

Edited: 10 years ago#540

Andrez
10 Posts

Oh ok, honestly I'm not interested about SEO and similars at the moment... Thank you!

10 years ago#546

cvice
4 Posts

Strodtbeck,

I have the same problem as what you describe. When I turn on the mod_rewrite feature, the URLs are rewritten correctly, but I lose the image I have in the header, and when I try to browse to an image via the wysiwyg editor, it returns me to the home page. I can't figure out how to do this. Mine is running live on an Apache server.

I will say I LOVE this cms. It is EXACTLY what I need on so many little jobs.

Edited: 10 years ago#731

Charles S
448 Posts
13.7K Downloads
2 Themes
8 Plugins

 

In 1.6 you can NOT have index.php removed and browse server for image within CKEditor. That has been fixed in 1.7. If your images aren't showing on your site when you change the URL mod_rewrite remove the .. in the relative link to the image: ../data/_uploaded/image/   change to  /data/_uploaded/image/

This is a bug I found while playing with 1.7 and it may be the problem you are having. In 1.7 images will not have the .. before the relative link as it is the entire path from root install.

1.7 beta should hit in a couple weeks. A few bugs crawled into 1.7a4 but they aren't anything life threatening. . . I'm currently using 1.7a4 for two sites live without a problem. You just have to know where the bugs are ;) see the bug list via the contact page here.

hope that answered your question.

10 years ago#732

cvice
4 Posts

That did answer my question, and it's all working great now - thanks!

10 years ago#826

Topic Closed

 

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

HH-Support

Company located in T├│rshavn, Faroe Islands. * Webpage Design * Consultant & Provider of a wide range of programs for visually impaired and dyslextics.

Find out more about our Provider Spotlight

Log In

  Register