LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-15-2006, 09:44 AM   #1
c0nsur
Member
 
Registered: Aug 2004
Posts: 34

Rep: Reputation: 15
Question Apache :: ModRewrite ?


hi gys,
im writting my .htaccess and i have a little problem here.

i have php files and i want to rewrite the url so i do this :

RewriteRule ^FakeFolder/ /MyPage.php?cat=1 [L]

so when i point to myDomain.com/FakeFolder/ that works great

NOW:

i want to rewrite /MyPage.php?cat=1 TO FakeFolder

tried several things but none of 'em has worked...

any clue ?

Thanks
Luke.
 
Old 03-15-2006, 02:47 PM   #2
c0nsur
Member
 
Registered: Aug 2004
Posts: 34

Original Poster
Rep: Reputation: 15
Infinite loop

lol im falling into an infinite Loop
mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.

someone can help me?

Thanks
Luke.
 
Old 03-15-2006, 03:40 PM   #3
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
You are going to get an infinite loop. What do you expect?

What, specifically, are you trying to accomplish?
 
Old 03-15-2006, 09:52 PM   #4
c0nsur
Member
 
Registered: Aug 2004
Posts: 34

Original Poster
Rep: Reputation: 15
Exclamation What i want to do...

i need to do something like that:

i have X number of pages like that :

MyPage.php?var=1
i want to show a friendly URL like this /MyFolder/blabla or something..

so its easy im already trying this :

Code:
RewriteRule ^MyFolder/ /MyPage.php?var=1 [L]
BUT :
in MyPage.php i have a form :
Code:
<form action="<?=$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];?>" method="post" name="navigation" id="navigation">

PHP_SELF = MyPage.php?var=1 and NOT MyFolder/

is there a way to tell apache there is a rule about that or should i wrap something from my php file?

im asking because i have aroud 200 pages

thanks
Luke

Last edited by c0nsur; 03-16-2006 at 09:34 AM.
 
Old 03-16-2006, 09:37 AM   #5
c0nsur
Member
 
Registered: Aug 2004
Posts: 34

Original Poster
Rep: Reputation: 15
Exclamation some idea?

any other way i can do it without PHP from a SWITCH CASE ?

sorry for insisting, but my boss is screaming behind me all day long! lol

Thanks
Luke.
 
Old 03-31-2006, 09:38 PM   #6
c0nsur
Member
 
Registered: Aug 2004
Posts: 34

Original Poster
Rep: Reputation: 15
everything works fine thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Had apache working, then set up vsftpd, now apache is refusing my connections beetle_boy66 Linux - Newbie 4 01-25-2006 08:57 PM
Mail from Apache being rejected - Cannot route to sender apache@localhost.localdomain jimwillsher Linux - Networking 2 01-19-2006 12:41 AM
Apache 1.3.33 (debian built) and Apache SSL does not respond to the proper ports lqorg_user Linux - Networking 0 11-06-2005 04:11 PM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 05:30 AM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 10:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration