Jump to content

path issue


deepson2

Recommended Posts

Hello,

 

I have page games.php. using htaccess i have been using only this url

 

sitename/games/gamesname

 

Using gameid i can see different game pages . Now on this gamesname.php,i am trying to build up add favorite games option. using ajax i want to do that.

 

I have tested my code with simple insertion page.

but here on particularly on this page. where my site url is like this

 

sitename/games/gamesname

 

with this path its showing me this error

 

 

The page cannot be found

 

The page you are looking for: /games/sliderman/addremovefav.php?t=1246876451&gameid=11240

 

Can anyone tell me how can i work this out?

 

addremove.php

gamepage.php

ajaxdev.js

 

everything is in the same folder.When i add this

 

 

var url = '../../addremovefav.php';

 

into my addfav.js, it showing me the following error

 

 

The page cannot be found

 

The page you are looking for: /addremovefav.php?t=1246876921&blogid=11240

 

why this extra "/" is coming?

 

I hope you people ll understand what i am asking here. because its bit confusing for me as well.

 

please help me.

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/165024-path-issue/
Share on other sites

This is my htaccess look like. i dont understand why this "/" is coming.

 

ab is the main folder, where all my file are there.

 

RewriteRule games/([-a-z|A-Z|0-9|-|.|'|,|&|_|!|:]+)/([0-9]+)$ /ab/games/$1/$2/ [R=301,L]

RewriteRule games/([-a-z|A-Z|0-9|-|.|'|,|&|_|!|:]+)/([0-9]+)/$ /ab/gamesname\.php?url=$1&start=$2

 

RewriteRule games/([-a-z|A-Z|0-9|-|.|'|,|&|_|!|:]+)$ /games/$1/ [R=301,L]

RewriteRule games/([-a-z|A-Z|0-9|-|.|'|,|&|_|!|:]+)/$ /ab/gamesname\.php?url=$1

 

can anyone tell me. why i am getting this extra "/" ?

Link to comment
https://forums.phpfreaks.com/topic/165024-path-issue/#findComment-870232
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.