Slashes being added to URL

Hi,

I am getting a slash added into the middle of my url. It does not seem to be coming from htaccess so i think it is coming from php.ini.

For example, my page is called index.php?board=16.0 but when this link is clicked the url comes up as index.php/?board=16.0

Can someone please help? ;D

Cheers

Tim

how are the links used? As in your anchor elements,

[php]Page[/php]

Magic? Show some code…

Hi,

the site is

my2home.net

an example of the link is

Re: Living in Sarawak or…

this link comes through as

http://www.my2home.net/index.php/?topic=3968.msg35250#new

and just takes them to the home page

Cheers

Tim

Well, there is no slash in the example, therefore something else is incorrect.

Are you creating the example you showed using PHP? I mean are you pulling the website fro code and then adding
the ?topic… part? If so, show us the code where the <a href is created… I am guessing you are placing the info into the
href with PHP code and are using the wrong system root name.

Or, you have some really odd in your .htaccess file. Either way, I doubt you are showing us all the code for this example.

Now, normally, if you have a link to your own site, you don’t place all of the URL into it. If you are on somepage.php and want
to call the index.php file, you would not use the http…net part, but, just use the index.php… part. Did that make sense?
Also, you seldom make calls to your index file as that is just where the first page of your site exists and usually is the log
in page or a “landing” page. But, if you do, just use the ?.. part as Astonecipher mentioned…

Hi,

the added slash is

http://www.my2home.net/index.php/?topic=3968.msg35250#new

in red.

No the php is not creating the page it is a page file that is called index.php?topic=3968.msg35250#new

my htaccess file is

RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

Cheers

Tim

Well, remove the slash on the last line of your rewrite code. It appears you are placing it there.

Here is the Apache rewrite manual and it has a lot of ways to fix this. It talks about removing the trailing slash, but,
the code is a lot different than yours. I think you just need to remove it. Not sure…

http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

Sponsor our Newsletter | Privacy Policy | Terms of Service