0

Hi,

I made a web application and I am passing variables like this

www.mysitename.com/index.php?variableName=120

but I found in some web sites that the url like this

www.mysitename.com/120

I don't have any idea about this. Can any one tell me how can I do this in my website also

Thanks in advance
Rajeesh

7
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by Manuz
0

In this format it would normally be trying to execute the index module in the folder called 120. I don't believe that this has anything to do with passing variables.

0

its because of htaccess, try searching about htaccess so you know what it can do about rewriting urls

Edited by vaultdweller123: n/a

0

Hey,
If my understandings are correct,you want to change your url pattern to something like the one you mentioned.rit? So in the Hyperlink (where ever you need) specify the url as

www.mysitename.com/variableName/120/index.php

Then in .htaccess use the rewrite rule as

RewriteRule ^variableName/([^\.]+)/([^\.]+)\.php$ www.mysitename.com/index.php?variableName=$2 [L]

Was not sure really may be some bugs be ter. Just find it out okey!!

Edited by Manuz: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.