Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 1394 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

?id=9_0_7_0_C

Thread title: ?id=9_0_7_0_C
Closed Thread    
    Thread tools Search this thread Display Modes  
12-08-2005, 03:04 PM
#1
Dan is offline Dan
Dan's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 3,164
iTrader: 15 / 86%
 

Dan is an unknown quantity at this point

  Old  ?id=9_0_7_0_C

Right, so i've just setup a mod-rewrite that goes like:

http://www.webpage.com/tutorial/9_0_7_0_C/

Now i need to 'hack' my CMS, it currently displays it as "?id=9_0_7_0_C". Is there any way-what-so-ever to get rid of "?id=" and just display the "9_0_7_0_C" ??

Thanks for any help in advance.

12-08-2005, 03:31 PM
#2
Salathe is offline Salathe
Salathe's Avatar
Status: Community Archaeologist
Join date: Jul 2004
Location: Scotland
Expertise: Software Development
Software: vim, PHP
 
Posts: 3,820
iTrader: 25 / 100%
 

Salathe will become famous soon enough

Send a message via MSN to Salathe

  Old

We'd need to know the internal workings of your CMS. A name would be a good start.

12-08-2005, 03:49 PM
#3
Dan is offline Dan
Dan's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 3,164
iTrader: 15 / 86%
 

Dan is an unknown quantity at this point

  Old

I think all i need to do is a find and replace on "?id=" to "/".

12-10-2005, 02:07 PM
#4
freedom is offline freedom
freedom's Avatar
Status: Request a custom title
Join date: Dec 2005
Location: LIC (NYC), NY
Expertise:
Software:
 
Posts: 1,026
iTrader: 0 / 0%
 

freedom is on a distinguished road

  Old

Look in the file you're working with for something like "?id" or something similar and change it to what you need to change it to ("/").

Or, do you think you could post the name of the CMS you're working with?

12-10-2005, 09:03 PM
#5
jared is offline jared
jared's Avatar
Status: Member
Join date: Sep 2005
Location: Victoria, TX
Expertise:
Software:
 
Posts: 172
iTrader: 0 / 0%
 

jared is on a distinguished road

Send a message via AIM to jared Send a message via Skype™ to jared

  Old

if he gets rid of the ?id then when he queries the pages PHP isn't going to know what to do with 9_0_7_0_C

12-10-2005, 09:46 PM
#6
Vince4Heisman is offline Vince4Heisman
Status: Sin Binner
Join date: Nov 2005
Location:
Expertise:
Software:
 
Posts: 82
iTrader: 0 / 0%
 

Vince4Heisman is on a distinguished road

  Old

Originally Posted by jared
if he gets rid of the ?id then when he queries the pages PHP isn't going to know what to do with 9_0_7_0_C
yes it does apache tells it

12-11-2005, 01:17 AM
#7
xZaft is offline xZaft
Status: Member
Join date: Jul 2005
Location: Massachusetts, US
Expertise:
Software:
 
Posts: 428
iTrader: 0 / 0%
 

xZaft is on a distinguished road

  Old

Vince is right. I'll get the code.

Code:
RewriteEngine on
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^tutorials/(.*)/$ tutorials/$1 [R]
RewriteRule ^tutorials/(.*)$ tutorials.php?id=$1 [L]
Don't ask me what it does. I have no idea actually. All I know is it works. If you want to change just add the R and L ones and just change was needs changing. Don't touch the (.*) and so forth.

12-11-2005, 01:31 AM
#8
jared is offline jared
jared's Avatar
Status: Member
Join date: Sep 2005
Location: Victoria, TX
Expertise:
Software:
 
Posts: 172
iTrader: 0 / 0%
 

jared is on a distinguished road

Send a message via AIM to jared Send a message via Skype™ to jared

  Old

Yeah turning rewrite will work. Many CMS systems have the option to turn it on to make your site more SE friendly.

But I believe it has to be enabled in apache? If you are on host that has it disabled you maybe stuck..

12-11-2005, 04:24 PM
#9
freedom is offline freedom
freedom's Avatar
Status: Request a custom title
Join date: Dec 2005
Location: LIC (NYC), NY
Expertise:
Software:
 
Posts: 1,026
iTrader: 0 / 0%
 

freedom is on a distinguished road

  Old

Originally Posted by jared
Yeah turning rewrite will work. Many CMS systems have the option to turn it on to make your site more SE friendly.

But I believe it has to be enabled in apache? If you are on host that has it disabled you maybe stuck..
Yup. Your host has to have it loaded as a module, but I'm pretty sure all the 'modern' hosts have mod_rewrite enabled.

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed