Welcome to WebmasterWorld Guest from 54.146.47.178

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Simple rewrite for rss script not working

Simple rewrite for rss script not working

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

New User

joined:May 8, 2013
posts:5
votes: 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.


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

New User

joined:May 8, 2013
posts:5
votes: 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 .


.