
Jeffncou
User
Feb 4, 2012, 3:00 AM
Post #5 of 8
(1953 views)
Shortcut
|
|
Re: [Tom P] mod_rewrite for instant website
[In reply to]
|
Can't Post
|
|
Hi Tom, Thanks for your reply and very thorough explanation. If I have understood you correctly while the links that include a string of letters dash string of letters and numbers dash string of numbers won't work, those that consist of string of letters dash string of numbers should work with: Options +FollowSymlinks RewriteEngine on RewriteRule ^/([a-z]+)-([0-9]+)$ http://demo.wemakemagazines.co.uk/index.php?$1-$2 [NC Therefore demo.wemakemagazines.co.uk/index.php?menu-2a-44 would result in a 404 error but the rule would detect demo.wemakemagazines.co.uk/index.php?gifts-49 and replace with the desired demo.wemakemagazines.co.uk/gifts-49 However instead I get: The requested URL /gifts-49 was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Any ideas? I have got rewrites to work correctly on other sites but for some reason it is not working with the instant website addon. I wonder if it has something to do with the following code in the website_init.php that comes supplied with the instant website plugin: // modify page links for useSeoUrls if ($website_config['useSeoUrls']) { foreach (array_keys($categoryRecords) as $index) { $category = &$categoryRecords[$index]; $category['_link'] = preg_replace('/index.php\//', '', $category['_link']); // remove index.php filename $category['_link'] = preg_replace('/\/$/', '', $category['_link']); // remove trailing slash on SEO links } } I appreciate your time on this - if you would prefer to move this to a paid for support request I would be happy to do so
(This post was edited by Jeffncou on Feb 6, 2012, 3:05 AM)
|