efiction 3 and mod_...
 
Notifications
Clear all

efiction 3 and mod_rewrite

4 Posts
3 Users
0 Reactions
2,117 Views
(@little-blue)
Posts: 2
New Member
Topic starter
 

I've been investigating doing some mod_rewrite stuff on my efiction installation to make the urls prettier and stuff, and whilst I think I've got a suitable .htaccess file (or at least will have one once I work out all the file / parameter combinations), I was wondering if the software can be easily modded to work with this?

This is some of the .htaccess rules:

RewriteRule ^viewstory/contents/([0-9]+)/$	viewstory.php?sid=$1&index=1
RewriteRule ^viewstory/([0-9]+)/([0-9]+)/$ viewstory.php?sid=$1&chapter=$2
RewriteRule ^viewstory/([0-9]+)/$ viewstory.php?sid=$1

sending http://mysite.com/archives/viewstory/4/ to http://mysite.com/archives/viewstory.php?sid=4

Unfortunately, I can't browse off that page since efiction does relative url's so if it linked to viewstory.php?sid=4&chapter=2, the url is http://mysite.com/archives/viewstory/4/viewstory.php?sid=4&chapter=2.

I don't really have a clue about modding efic in terms of modules or blocks, but it kinda looks like if I want this to work properly (ie, have links to viewstory.php?sid=4&chapter=2 rendered as http://mysite.com/archives/viewstory/4/2/ as per the rewrite rules) I'd have to go through every file on efic and change the code everytime an <a href> is generated. (Perhaps refined by setting an if statement in the code and a bool in the database/config file that allows users to change from the rewrite to default).

Is there a more economical way to do this because at the moment this looks like a hell of a lot of work for what some may argue is little benefit?

More useful would be stuff like /viewstory/{story title}/ but I've no idea how to do that.

Thanks.


 
Posted : 23/05/2007 5:23 am
(@tammy)
Posts: 2577
Member Moderator
 

No there is no way to do this without hacking the files.


 
Posted : 23/05/2007 10:21 pm
(@little-blue)
Posts: 2
New Member
Topic starter
 

I see. Oh well, cheers for the response πŸ™‚

Even though it seems like it might be a lot of work, I plan to hack my files to do this. Would anyone be interested in seeing the changelog to implement this on their own installation once I've finished?


 
Posted : 24/05/2007 3:57 am
Jan_AQ
(@jan_aq)
Posts: 1300
Noble Member
 

I'm sure someone will. πŸ™‚


Whoever said nothing is impossible never tried slamming a revolving door.

url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word

 
Posted : 24/05/2007 10:09 pm
Share: