HighDots Forums  

.htaccess

alt.html alt.html


Discuss .htaccess in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
damezumari
 
Posts: n/a

Default .htaccess - 06-09-2008 , 11:49 PM






My current .htaccess file looks like this:

Options +Indexes
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*).html$ index.php?page=$1 [L]

So when the url is test.html it is redirected to index.php?page=test.

I would like to send a parameter like this: test.html?id=8 and have it
redirected to index.php?page=test&id=8.

How do I change the rewriterule to achieve that?

If there is no argument in the html page it shall be redirected like
it was before.

Kind regards,

Jan Nordgreen

Reply With Quote
  #2  
Old   
Neredbojias
 
Posts: n/a

Default Re: .htaccess - 06-10-2008 , 12:20 AM






On 09 Jun 2008, damezumari <jannordgreen (AT) gmail (DOT) com> wrote:

Quote:
My current .htaccess file looks like this:

Options +Indexes
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*).html$ index.php?page=$1 [L]

So when the url is test.html it is redirected to index.php?page=test.

I would like to send a parameter like this: test.html?id=8 and have it
redirected to index.php?page=test&id=8.

How do I change the rewriterule to achieve that?

If there is no argument in the html page it shall be redirected like
it was before.
Can't you use "test.php" and implement a php variable to that effect?

--
Neredbojias
http://www.neredbojias.net/
Great sights and sounds


Reply With Quote
  #3  
Old   
damezumari
 
Posts: n/a

Default Re: .htaccess - 06-10-2008 , 09:11 AM



Excellent Kim! Thanks!

(Fra en nordmann til en annen. )

Jan Nordgreen

Reply With Quote
Reply




Thread Tools
Display Modes

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

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.