homepage Welcome to WebmasterWorld Guest from 23.20.91.134
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Simple rewrite for rss script not working
Simple rewrite for rss script not working
jeddi




msg:4621293
 1:56 pm on Nov 5, 2013 (gmt 0)

Hi,

I have written a simple script to generate my rss file on demand.

The script is on [simpg.net...]

As you can see it take the rss variable to locate page.

I want to use a url which is related to the page
so it will be like this:

[villarentfethiye.simpg.net...]

So in my .htaccess file, I have:


# GETTING RSS FILE BY PAGE NUMBER
# http://villarentfethiye.simpg.net/rss-feed-5.xml

RewriteCond %{HTTP_HOST} ^(.+).simpg.net$ [NC]
RewriteCond %{HTTP_HOST} !^www.simpg.net$ [NC]
RewriteRule ^[\.0-9,:\/-a-z]+rss_feed-([0-9]+)\.xml$ http://simpg.net/rss_feed.php?rss=$1 [NC,QSA,L]


I also have in the same htaccess file this:

( immediately after the above )


# GETTING SUPPORT PAGE BY PAGE NO
# http://some-name.simpg.net/greatest-gadget/p1.html

RewriteCond %{HTTP_HOST} ^(.+).simpg.net$ [NC]
RewriteCond %{HTTP_HOST} !^www.simpg.net$ [NC]
RewriteRule ^[\.0-9,:\/-a-z]+-p([0-9]+)\.html$ http://simpg.net/info.php?p=$1 [NC,QSA,L]


When I click on my link, my server runs the info.php script
and not the rss_feed.php script.

Can anyone see what I have done wrong ?


Thanks.


.

 

jeddi




msg:4621315
 3:28 pm on Nov 5, 2013 (gmt 0)

I wanted to edit and change those urls to example.com
but I was too late :(

This is what it should be:


# GETTING RSS FILE BY PAGE NUMBER
# http://villarentfethiye.example.com/rss_feed-5.xml

RewriteCond %{HTTP_HOST} ^(.+).example.com$ [NC]
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule ^[\.0-9,:\/-a-z]+rss_feed-([0-9]+)\.xml$ http://example.com/rss_feed.php?rss=$1 [NC,QSA,L]


# GETTING SUPPORT PAGE BY PAGE NO
# http://some-name.example.com/greatest-gadget/p1.html

RewriteCond %{HTTP_HOST} ^(.+).example.com$ [NC]
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule ^[\.0-9,:\/-a-z]+-p([0-9]+)\.html$ http://example.com/info.php?p=$1 [NC,QSA,L]


Sorry for any problem .


.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved