Using the ? in url's

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Pieter
Posts: 54
Joined: Sat 20. Mar 2004, 18:08

Using the ? in url's

Post by Pieter »

I stumbled over something awkward.
When I write an url like http://www.bla.com/index.php?bla
Alls goes well
When I just write index.php?bla
It translates to http://www.bla.com/bla.shtml


Why is this? The relative url would be much easier to use, so I hope this is possible,
Pappnase

Post by Pappnase »

hello

this ist the rewrite function! when you create site structures give them an alias so the url will rewrite from index.php?about_us to about_us.shtml.
Pieter
Posts: 54
Joined: Sat 20. Mar 2004, 18:08

Post by Pieter »

Pappnase wrote:create site structures give them an alias.

The items in the site structure have an alias :?
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

the Bla is the alias.
if you preffer to have index.php?bla the nyou must turn rewrite off in include/inc_conf/conf.inc.php
Pappnase

Post by Pappnase »

then it's ok!

cos this was made that google would have no problems to index your site!

if you don't wann have it rename the .htaccess to _.htaccess and in the conf.inc.php edit the following line.

from

Code: Select all

$phpwcms["rewrite_url"]       = 1;        //whether URL should be rewritable
to

Code: Select all

$phpwcms["rewrite_url"]       = 0;        //whether URL should be rewritable
Pieter
Posts: 54
Joined: Sat 20. Mar 2004, 18:08

Post by Pieter »

It's not that I mind the rewrite, but where are the *.shtml files ??
User avatar
Oliver Georgi
Site Admin
Posts: 9920
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

It's a fake ;-) - just for rewriting.

Absolute no *.shtml file exists.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Pieter
Posts: 54
Joined: Sat 20. Mar 2004, 18:08

Post by Pieter »

Oliver Georgi wrote:It's a fake ;-) - just for rewriting.
What's the rewrite used for then, if it makes the url's rewrite to non-existen files ??
User avatar
Oliver Georgi
Site Admin
Posts: 9920
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

phpwcms: index.php?test -> test.shtml or index.php?id=0,0,0,0,0,0 -> 0.0.0.0.0.0.shtml

Apache test.shtml -> index.php?test and 0.0.0.0.0.0.shtml -> index.php?id


Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

well for search engines... search in this forum and you will find tons of posts...!!
http://www.studmed.dk Portal for doctors and medical students in Denmark
Pieter
Posts: 54
Joined: Sat 20. Mar 2004, 18:08

Post by Pieter »

Oliver Georgi wrote:phpwcms: index.php?test -> test.shtml or index.php?id=0,0,0,0,0,0 -> 0.0.0.0.0.0.shtml

Apache test.shtml -> index.php?test and 0.0.0.0.0.0.shtml -> index.php?id
Sorry, I don't understand what you mean :oops:
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

Pieter wrote:
Oliver Georgi wrote:phpwcms: index.php?test -> test.shtml or index.php?id=0,0,0,0,0,0 -> 0.0.0.0.0.0.shtml

Apache test.shtml -> index.php?test and 0.0.0.0.0.0.shtml -> index.php?id
Sorry, I don't understand what you mean :oops:
well it make fakes "links" that is more easy to reminder, and that search engines like - so you site will be indexed on google etc.. that´s the point

Read some of the post in the forum - for more details...
http://www.studmed.dk Portal for doctors and medical students in Denmark
Pieter
Posts: 54
Joined: Sat 20. Mar 2004, 18:08

Post by Pieter »

frold wrote:well it make fakes "links" that is more easy to reminder, and that search engines like - so you site will be indexed on google etc.. that´s the point

Read some of the post in the forum - for more details...
But why is that nice, if the links refer to non-existing pages. No one can use the site anymore ?!
Pappnase

Post by Pappnase »

hello

why should nobody use the site anymore?? you create the content in the admin area. and any visitor will see your created pages with the difference that it's shown as shtml and not as php!
tyr
Posts: 31
Joined: Tue 9. Dec 2003, 04:36
Location: Pennsylvania, USA

Post by tyr »

The links DO refer to existing pages. The system presents a more user-friendly or search engine-friendly URL on the frontend, but the phpWCMS translates the nicer-looking URL internally so you get the correct content.

When teh seach engines index your site they equate the content with the re-written URL. phpWCMS knows what the browser is looking for and provides the correct contenet page without the requester knowing any different.

You can use a file extension other than .shtml if you wish, as has been mentioned elsewhere in the forum.
Post Reply