Maian Script World on Facebook Maian Script World on Twitter Maian Script World - Latest News Maian Script World on YouTube Maian Script World on LinkedIn


Please Read

You are required to register before you can post. This is via a custom verification system. Please post any problems you are encountering here and I`ll do my best to respond as soon as I can. Please note that a reply WILL be posted to all queries, so do not double post. There are no guarantees when a reply will appear but I do my best to answer all within 3/4 days max. Bumping topics won`t make the slightest difference.

IMPORTANT: Posts in English ONLY please, thank you! Any other languages will be ignored and your message deleted.
SEARCH: Use the search option to see if your question has been answered on the forum before. Or check the relevant script docs.
CUSTOMER: If you have purchased a commercial version of any of my software, using the contact option at the licence centre ensures a faster response.
AUTO DELETION: Accounts older than 5 days, with no posts or topics, are automatically deleted. Only register if you are thinking of posting.
PRIVATE MESSAGES: Private messages are currently disabled.
LINKS: Any links posted are 'NOFOLLOW' and will not be picked up by search engines.

You are not logged in.

#1 19-07-2006 10:16:14

ductais
Members
Registered: 19-07-2006
Posts: 2

Mod Rewrite

I have "Enable Mod Rewrite" to Yes

But my customer can't login to their account. Please fix this bug soon.

Offline

#2 19-07-2006 10:28:36

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,069

Re: Mod Rewrite

Hi,

This is not a bug. Are your customers using their correct details? The log in works fine. If mod_rewrite isn`t working for you, disable it and try without to see if you get the same results.

David.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#3 19-07-2006 10:35:58

ductais
Members
Registered: 19-07-2006
Posts: 2

Re: Mod Rewrite

I want to use mod_rewrite

Please send me sample of .htaccess

Offline

#4 19-07-2006 19:57:39

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,069

Re: Mod Rewrite

The sample is found in the script folder.

David.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#5 14-10-2007 14:10:03

RMD
Members
From: United States of America
Registered: 27-08-2007
Posts: 22

Re: Mod Rewrite

David,
Truly sorry to bug you about this. I see the message "Make sure that the .htaccess file included in the script  is uploaded into your e-card directory" but I can't find where the sample .htaccess file is in the script folder.

Offline

#6 15-10-2007 17:59:19

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,069

Re: Mod Rewrite

The .htaccess file is in the .zip file you downloaded, alongside the main index.php file.

David.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#7 16-10-2007 12:20:53

RMD
Members
From: United States of America
Registered: 27-08-2007
Posts: 22

Re: Mod Rewrite

I re-downloaded the .zip file but the only 2 files I see at the top level are index.php and readme.txt. The rest are folders (admin, classes, cron, etc.). What is the file name that I should find?

Offline

#8 17-10-2007 06:16:55

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,069

Re: Mod Rewrite

Have you uploaded the files? How are you viewing the directory? If you are viewing the files in an FTP program, some FTP programs hide the .htaccess file. If you have all the files uploaded, you should see the .htaccess file on your file manager on your server.

David.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#9 17-10-2007 20:13:01

RMD
Members
From: United States of America
Registered: 27-08-2007
Posts: 22

Re: Mod Rewrite

Oh my, I really have to learn to follow instructions to the "T" :-) The original .htaccess file was never uploaded because I had set up a directory called "ecards" and then just dumped the file/folders from the unzipped file into it. Of course, the .htaccess file didn't make it and I was looking for something like "sample.htaccess" etc. David, sorry for all the bother. The mod_rewrite finally works for me, except for one thing that I want to change, but may not be able to.

I changed "ecard(.*)" in the .htaccess file to "romantic-ecard-(.*)" (also modified the class_modR  file) . It works fine everywhere but in member account section when you display the favorites. The correct ecard shows, but the "Send ecard" URL is the mod_rewrite URL you originally had (ecards(.*).html), not my new "romantic-ecards-(.*).html". I've looked through everything to try and figure this out on my own but couldn't. I tried adding this to the .htaccess: RewriteRule ^romantic-ecard-(.*)\.html$ ecard(.*).html$1  and also added this in the class_modR file:
                if (strstr($url, 'ecard'.$id.'.html'))
                {
                  return 'romantic-ecard-'.$id.'.html';
                }
but no luck. Can this be accomplished? I hope I explained this correctly.

Offline

#10 18-10-2007 06:32:41

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,069

Re: Mod Rewrite

Glad you got it sorted.

v3.0 will have better mod_rewrite support. Its not too clever at the moment. The url seen by the browser is actually the php file, but is masked by the htaccess file. So, using an .html link in the strstr function isn`t going to work because technically the html file doesn`t exist.

The problem is I forgot to run the favourite ecard url through the class checker. So, in the index.php file find line 1191 and change the url there.

David.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#11 18-10-2007 09:44:41

RMD
Members
From: United States of America
Registered: 27-08-2007
Posts: 22

Re: Mod Rewrite

This did it in 2 seconds. After I posted, I realized what you said about the strstr function, it can't find something that doesn't exist. Now that you showed me where to find the 'modr' in the index.php, I can change the British "favourite" in the URL to U.S. "favorite". That was the last thing, I was going to leave it, but this makes it easy to change.

David, thank you so much for all your support!

Offline

#12 19-10-2007 06:20:45

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,069

Re: Mod Rewrite

No problem, glad you got everything sorted.

David.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#13 24-10-2011 10:09:58

teze
Members
From: Moscow never sleep
Registered: 23-05-2009
Posts: 80

Re: Mod Rewrite

mod rewrite for /index.html?cmd=pickup&code=aab8e17c583 link doesn't work(
on base downloaded script same problem..
it occurs when check card from E-Card Pickup page (pickup.html)

probably it would be show so pickup_aab8e17c583.html ?


how to fix it?

Last edited by teze (24-10-2011 10:29:19)

Offline

#14 24-10-2011 11:00:54

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,069

Re: Mod Rewrite

I can`t find this link in the code: index.html?cmd=pickup

Sorry, where does it appear?


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#15 24-10-2011 11:05:26

teze
Members
From: Moscow never sleep
Registered: 23-05-2009
Posts: 80

Re: Mod Rewrite

Check any card from this link http://www.maianscriptworld.com/demos/greetings/index.php?cmd=pickup  (when mod rewrite is on, /pickup.html) and them show as /index.html?cmd=pickup&code=aab8e17c583 , as example. How to change this link to pickup_aab8e17c583.html?

P.S: In email notification link correctly show as /pickup_aab8e17c583.html

Last edited by teze (24-10-2011 11:06:41)

Offline

#16 25-10-2011 19:12:54

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,069

Re: Mod Rewrite

I`m not sure where in the code. Its been so long since I looked at the greetings system.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#17 27-10-2011 04:52:33

teze
Members
From: Moscow never sleep
Registered: 23-05-2009
Posts: 80

Re: Mod Rewrite

Check ON the mod rewrite function in admin panel. Send any card, copy id number and go to page E-Card Pickup ( pickup.html) and check card id in form action - you get a another link, as example index.html?cmd=pickup&code=aab8e17c583

To find where it:

1) This code <?php echo $this->FORM_ACTION; ?> 

<form method="GET" action="<?php echo $this->FORM_ACTION; ?>">

in the pickup.tpl.php;

2) in the index.php
   

$tpl_pickup->assign('FORM_ACTION', ($SETTINGS->modr ? 'index.xml' : 'index.php'));
   $tpl_pickup->assign('NAME', $msg_pickup2);
   $tpl_pickup->assign('NAME_VALUE', ($code ? $code : ''));

So, when we get a card from the page domain.com/pickup.html as check card id (input button click to view card), mod rewrite function getting name from the form name as domain.com/index.html?cmd=pickup&code=aab8e17c583.

But in notification email, this link shows as domain.com/pickup_aab8e17c583.html

How to fix it to change link from form page to right mod rewrite link as pickup_aab8e17c583.html? Please, help with php code to get the same link for card pickup ( as pickup_aab8e17c583.html )

Last edited by teze (27-10-2011 04:55:17)

Offline

#18 27-10-2011 05:09:09

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,069

Re: Mod Rewrite

Try this:

1. Open the 'templates/pickup.tpl.php' file. Remove the form tags completely.

2. Give the box an id: id="code"

3. Change the form button from a submit to a button: type="button"

4. Add onclick routine to button.

onclick="if(document.getElementById('code').value!=''){window.location='pickup_'+document.getElementById('code').value+'.html'}else{return false;}"

Think that should work ok.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#19 09-11-2011 14:08:41

teze
Members
From: Moscow never sleep
Registered: 23-05-2009
Posts: 80

Re: Mod Rewrite

1) Isn't work, after click it open pickup_undefined.html page.

<form method="GET" id="code">
<input type="hidden" name="cmd" value="pickup">
<p><?php echo $this->MESSAGE; ?></p>
<p><?php echo $this->NAME; ?>: </p>
<p><input class="formbox" type="text" name="code" value="<?php echo $this->NAME_VALUE; ?>"> <input type="button" onclick="if(document.getElementById('code').value!=''){window.location='pickup_'+document.getElementById('code').value+'.html'}else{return false;}" value="<?php echo $this->PICKUP; ?>" title="<?php echo $this->PICKUP; ?>"></p>
</form>

help with it, please..

2) and, what what happens if javascript iff off in user browser options?

Last edited by teze (09-11-2011 14:11:48)

Offline

#20 09-11-2011 19:12:20

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,069

Re: Mod Rewrite

Give the box an id, not the form. tongue

All the new technologies require javascript now, so no point worrying about users having it disabled.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#21 13-11-2011 10:37:45

teze
Members
From: Moscow never sleep
Registered: 23-05-2009
Posts: 80

Re: Mod Rewrite

I get a right link, but card didn't show. ( link is right, but page is index.php )

Please, put examle code. Is it works?

Offline

#22 13-11-2011 13:20:07

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,069

Re: Mod Rewrite

Did you change the form submit button to a button?

type="button" not type="submit"


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#23 13-11-2011 19:44:39

teze
Members
From: Moscow never sleep
Registered: 23-05-2009
Posts: 80

Re: Mod Rewrite

<form>
	<input type="hidden" name="cmd" value="pickup">
	<BR>
	<?php echo $this->MESSAGE; ?>
	<br>
	<?php echo $this->NAME; ?>
	<br>
	<input type="text" name="code" value="<?php echo $this->NAME_VALUE; ?>" id="code">
	<br>
	<input type="button" value="<?php echo $this->PICKUP; ?>" title="<?php echo $this->PICKUP; ?>" onclick="if(document.getElementById('code').value!=''){window.location='pickup_'+document.getElementById('code').value+'.html'}else{return false;}">
</form>

and 10 any variables for that..  I did it at all. I gave id=name for box, form, input.. i use all versions, changed type of button, but it doesn't work :-( Show ur working variant, please

Last edited by teze (13-11-2011 19:50:38)

Offline

#24 14-11-2011 11:37:26

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,069

Re: Mod Rewrite

You may need to escape the apostrophes with window.location by using backslashes. Also, you don`t need the form tags.

<BR>
    <?php echo $this->MESSAGE; ?>
    <br>
    <?php echo $this->NAME; ?>
    <br>
    <input type="text" name="code" value="<?php echo $this->NAME_VALUE; ?>" id="code">
    <br>
    <input type="button" value="<?php echo $this->PICKUP; ?>" title="<?php echo $this->PICKUP; ?>" onclick="if(document.getElementById('code').value!=''){window.location='pickup_'+document.getElementById(\'code\').value+'.html'}else{return false;}">


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#25 14-11-2011 21:31:26

teze
Members
From: Moscow never sleep
Registered: 23-05-2009
Posts: 80

Re: Mod Rewrite

Damn, i took that version too.
And finally i find where was a mistake.. a use *htm, but not *html  loool 

I'm soorrry.... ((


Thanks!

Last edited by teze (14-11-2011 21:34:01)

Offline

Board footer

2Checkout.com is an authorized reseller of goods and services provided by Maian Script World.© 2003-2013 David Ian Bennett. All Rights Reserved | Forum: FluxBB

Privacy Policy | Refund Policy