WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-13-2006, 10:00 AM
WebProWorld New Member
 

Join Date: Jan 2006
Location: Färjestaden, Sweden
Posts: 7
toxisoft RepRank 0
Default Rewrite question

Hope this is the correct subcat for this question.
Any way here it goes.

If I have a htaccess looking like this:
RewriteRule ^(.*) http://www.somedomain.com/$1 [R=301]
RewriteRule ^(.*)\.html http://www.somedomain.com/$1.php [L]

And I want a specifik HTML-file to be unchanged, what should I do?
__________________
In for a challenge?
http://www.kalmar-multisport.se
Reply With Quote
  #2 (permalink)  
Old 02-13-2006, 10:15 AM
Faglork's Avatar
WebProWorld Veteran
 

Join Date: Feb 2005
Location: Forchheim, Germany
Posts: 947
Faglork RepRank 0
Default

Should be possible with a conditional rewrite:

http://httpd.apache.org/docs/1.3/mod...ml#RewriteCond

hth,
faglork
Reply With Quote
  #3 (permalink)  
Old 02-13-2006, 10:35 AM
WebProWorld New Member
 

Join Date: Jan 2006
Location: Färjestaden, Sweden
Posts: 7
toxisoft RepRank 0
Default

Quote:
Originally Posted by Faglork
Should be possible with a conditional rewrite:

http://httpd.apache.org/docs/1.3/mod...ml#RewriteCond

hth,
faglork
Well guess so, you dont by any chanse have an example? I am not that good at rewrites. Have never done them before.
__________________
In for a challenge?
http://www.kalmar-multisport.se
Reply With Quote
  #4 (permalink)  
Old 02-16-2006, 05:09 AM
Faglork's Avatar
WebProWorld Veteran
 

Join Date: Feb 2005
Location: Forchheim, Germany
Posts: 947
Faglork RepRank 0
Default Re: Rewrite question

Try this - not sure if it works:


RewriteRule ^(.*) http://www.somedomain.com/$1 [R=301]

RewriteCond %{REQUEST_URI} !^/yourfilename.html
RewriteRule ^(.*)\.html http://www.somedomain.com/$1.php [L]

hth,
faglork
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: ,



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
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0