Jump to content

Recommended Posts

Posted

Hi everybody-

 

In our long thread of mod_rewrite conversations, I have the next question. It seems that making sense of mod_rewrite just doesn't get any easier. The introduction to the module says

``The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail.''

 

Anyway, that aside, I've just switched my weblog over to textpattern. As far as I can tell, Textpattern doesn't generate a static XML feed; it's generated by a call to "index.php?rss=1" instead. Can I redirect requests for my old static file to this one, perhaps via mod_rewrite? I'm particularly thinking about anybody who reads my site with an aggregator (hey, I'm being generous to myself thinking there are that many of them, but I figure I ought to cover all the bases!), who won't see the update.

 

So, can I redirect requests to index.xml to index.php?rss=1 instead?

Posted (edited)

Yep. Just take index.xml and rewrite it as whatever you want:

 

>RewriteEngine On
RewriteRule   ^index\.xml$            index.php?rss=1     [L]

 

^index\.xml = the file request to rewrite

index.php?rss=1 = what you are rewriting it to

[L] = last rule... don't rewrite any farther

 

The result is that it will look like index.xml exists as a file.

 

More can be found here:

Edited by TCH-MikeJ

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...