How to get rid of "mydomain/index.php?mypage"

General questions about CMSimple
svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: How to get rid of "mydomain/index.php?mypage"

Post by svasti » Thu Aug 14, 2014 3:09 pm

cmb wrote:You may want to consider to add a rewrite rule to redirect from http://example.com/ to http://www.example.com/:
Same, doesn't work.
cmb wrote:On further consideration, it should be possible to add the /index.php -> / redirect to CMSimple_XH
that would be very good.
cmb wrote:However, if we would do this for XH 1.6.4, I suggest to make it optional as requesting index.php directly has its uses (manual maintenance mode: index.html in the root).
+1 (I also used this together with an index.htm saying website soon ready)

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: How to get rid of "mydomain/index.php?mypage"

Post by cmb » Thu Aug 14, 2014 4:54 pm

svasti wrote:Same, doesn't work.
Then check your Apache error.log. There should be a respective entry. You may have to increase the RewriteLogLevel (Apache 2.2).
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: How to get rid of "mydomain/index.php?mypage"

Post by svasti » Thu Aug 14, 2014 7:11 pm

Endlich, nach langem Rumprobieren und Durchforsten des Internets scheint es jetzt zu klappen:

The working htaccess is:

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.      [NC]
RewriteBase /
RewriteRule ^(.*)$ http://www.sachverstand-bauhandwerk.de/$1 [R=301,L,NE]

RewriteCond %{REQUEST_URI} /index\.php
RewriteRule ^index\.php / [QSA,L,R=301,NE] 
The important items are "RewriteCond %{HTTP_HOST} !^www\. " otherwise there'll be an infinite loop trying to rewrite
and NE, as there are some öäü in the Pageheadings.
:P

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: How to get rid of "mydomain/index.php?mypage"

Post by cmb » Thu Aug 14, 2014 7:48 pm

svasti wrote:The important items are "RewriteCond %{HTTP_HOST} !^www\. " otherwise there'll be an infinite loop trying to rewrite
I had not tested this part; the one I'm using works the other way round (removes the www subdomain). :oops:
svasti wrote:and NE, as there are some öäü in the Pageheadings.
Ah, I see.

I will an article in the Wiki later, if nobody has beaten me to it.
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: How to get rid of "mydomain/index.php?mypage"

Post by cmb » Tue Dec 16, 2014 11:16 pm

I abstain from voting on this issue. I don't have a problem with it as it is now, but it's okay for me to add an optional redirect via PHP.

OT:
cmb wrote:BTW: http://www.my-domain.de/ shows a blank screen! :shock:
Not any longer. Obviously, somebody has acquired the domain. I advise to stick to the reserved domain names for examples and tests etc.
Christoph M. Becker – Plugins for CMSimple_XH

ahref
Posts: 8
Joined: Mon Oct 26, 2015 8:33 am

Re: How to get rid of "mydomain/index.php?mypage"

Post by ahref » Mon Oct 26, 2015 9:19 am

Why not transfer the website to a domain that you want? From what I understand, you don't want the domain to show up as it is currently appearing? So it isn't about it not functioning properly or some other issue. So you should look into a domain transfer. I would recommend going with one of the nTLDs (new top level domains) since .business or .company is more memorable than .com, .org, than the other generic top level domains that are running out of options. This company offers nTLDs and easy domain transfers: http://www.1and1.com/domain-names#stage

Also, if you aren't sure what domain you want, here is a list for some of the nTLDs that you can choose from. I think they are pretty cool: https://iwantmyname.com/domains/new-gtl ... extensions

Post Reply