Foren / Cotonti / Support / url mod_rewrite page_add bug

ErsteVorherige123NächsteLetzte

question about page_add bug solving with mod_rewrite enabled

pieter
#16 10. Februar 2010, 02:27
In menuslots you can change it yourself by hand. Link you did before.
Menuslots are not generated automatically.
... can we help you ...
donP
#17 10. Februar 2010, 20:51
Yes, for menu slots it's quite simple, but I think pages and forum post (othewise parsing process) would be automatic. And the problem returns for sitemap (I'm actually using Tefra GenSiteMap)...
in [color=#729FCF][b]BLUES[/b][/color] I trust
Trustmaster
#18 12. Februar 2010, 04:09
I can make a plugin to rewrite relative links in pages and posts, but it won't be recommended for sites which don't already have many of old-way urls in posts.

Added 17 minutes later:

I see the problem about your plugin now. It uses $out['uri']:
$area_location = substr($out['uri'], 0, strpos($out['uri'], '.'));
Which is incorrect, because $out['uri'] depends on exact way of URL output.
The more correct way to get current area is:
global $z;
$area_location = $z;
May the Source be with you!

Dieser Beitrag wurde von Trustmaster (am 12. Februar 2010, 04:27, vor 15 Jahre) bearbeitet
donP
#19 1. März 2010, 03:35
Seems to work now... Thanks ;)

What about if I would have a different rule for one category, like this:

list.php?c=Category1 ==> http://Category1.mydomain.net
list.php?c=subcategory1 ==> http://Category1.mydomain.net/subcategory1
list.php?c=subsubcategory1 ==> http://Category1.mydomain.net/subcategory1/subsubcategory1

But only for some categories (living the other rules like now, with the intent of creating a fake subdomain for one or two categories of my website).

Added 1 day later:

Nobody here? :(
in [color=#729FCF][b]BLUES[/b][/color] I trust

Dieser Beitrag wurde von donP (am 2. März 2010, 08:31, vor 15 Jahre) bearbeitet
Trustmaster
#20 2. März 2010, 16:38
You need to modify list_url_structure() in functions.custom.php and add some logic checking $args['c'] and returning absolute urls for your subdomain categories.
May the Source be with you!
donP
#21 2. März 2010, 21:38
I've tried Lombi's solution ( http://www.cotonti.com/forums.php?m=posts&q=2509 ) but unfortunately, when I rewrite
http://www.sangelo.net/list.php?c=category1
with
http://category1.sangelo.net
my Server redirects me to a courtesy page :( What's the problem? :/

Added 16 minutes later:


In the end, I would have a new method deriverd from your one (to create fake subdomains taking domaniname from the fisrt category of categories structure)...

Instead of (your actual method):

http://www.mysite.net/list.php?c=cat1 ==> http://www.mysite.net/cat1/
http://www.mysite.net/list.php?c=subcat1 ==> http://www.mysite.net/cat1/subcat1/
http://www.mysite.net/list.php?c=subsubcat1 ==> http://www.mysite.net/cat1/subcat1/subsubcat1/
...

like this:

http://www.mysite.net/list.php?c=cat1 ==> http://cat1.mysite.net
http://www.mysite.net/list.php?c=subcat1 ==> http://cat1.mysite.net/subcat1/
http://www.mysite.net/list.php?c=subsubcat1 ==> http://cat1.mysite.net/subcat1/subsubcat1/

Is it possible?
in [color=#729FCF][b]BLUES[/b][/color] I trust

Dieser Beitrag wurde von donP (am 2. März 2010, 22:50, vor 15 Jahre) bearbeitet
Trustmaster
#22 2. März 2010, 22:25
Your domain zone should be configured to forward *.mysite.com to the main site first, otherwise such "fake" subdomains won't work.
May the Source be with you!
donP
#23 2. März 2010, 22:43
And what have I to do to configure my domainzone to make working those "fake" subdomains?
Have I to contact my hosting Provider or is it a trick I can personally do (by cPanel or htacces)?
in [color=#729FCF][b]BLUES[/b][/color] I trust
Trustmaster
#24 3. März 2010, 00:45
It should be provided by your domain registrar or hosting control panel. You may contact your hosting support asking how you make generic subdomains to redirect to your main site.
May the Source be with you!
donP
#25 3. März 2010, 01:15
My Server is already capable to redirect http://sangelo.net to http://www.sangelo.net
Is it a good sign in that sense?
in [color=#729FCF][b]BLUES[/b][/color] I trust
Trustmaster
#26 3. März 2010, 01:48
www is a very usual configuration, but you need *
May the Source be with you!
GHengeveld
#27 4. März 2010, 17:17
Most registrars provide a control panel for DNS settings. cPanel has it also, but this is often disabled by the host. You have to add an A record for *.sangelo.net => server IP. Alternatively, a CNAME will probably work as well: *.sangelo.net => sangelo.net
donP
#28 4. März 2010, 18:40
I've created a CNAME ;) Thank you Koradhil (ar you back to Cotonti? I'd hope this).
Now every word I write in url as a third level domain (e.g. http://sport.sangelo.net) gives me the home page of my website. I think this is the right way, no?
Now, considering I'm not a good script coder, could anyone help me to rewrite Trustmaster function.custom.php and .htaccess rules to have the first level category of page strucrture as the name of the third level domain and not the first subfolder like in the actual solution? Like this:

Instead of (actual method):

http://www.mysite.net/list.php?c=cat1 ==> http://www.mysite.net/cat1/
http://www.mysite.net/list.php?c=subcat1 ==> http://www.mysite.net/cat1/subcat1/
http://www.mysite.net/list.php?c=subsubcat1 ==> http://www.mysite.net/cat1/subcat1/subsubcat1/
...

like this:

http://www.mysite.net/list.php?c=cat1 ==> http://cat1.mysite.net
http://www.mysite.net/list.php?c=subcat1 ==> http://cat1.mysite.net/subcat1/
http://www.mysite.net/list.php?c=subsubcat1 ==> http://cat1.mysite.net/subcat1/subsubcat1/
...


Is it possible?
in [color=#729FCF][b]BLUES[/b][/color] I trust
tensh
#29 4. März 2010, 22:56
# donP : Now every word I write in url as a third level domain (e.g. http://sport.sangelo.net) gives me the home page of my website. I think this is the right way, no?

It's quite normal in some webhost configurations even without htaccess, I think.
donP
#30 5. März 2010, 01:11
Not mine :/

Added 20 hours 9 minutes later:

Seems to be a too complicated mission also for our good coders... :(
in [color=#729FCF][b]BLUES[/b][/color] I trust

Dieser Beitrag wurde von donP (am 6. März 2010, 07:53, vor 15 Jahre) bearbeitet

ErsteVorherige123NächsteLetzte