Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- SEO friendly URLs Part 2


jasimon9 - 10:59 pm on Jan 21, 2013 (gmt 0)


Thanks for your input g1smd. I have taken your suggestion. On Windows, the absence of the leading slash causes a loop. When I put the slash back in, no loop occurs, but I get the 404 error.

lucy24 said that for a vhost (not htaccess) the leading slash is needed in each pattern. But when I put the leading slash in the first rewrite rule, the page is not redirected on the Mac instance. All my instances by the way are in a vhost <Directory>. Don't use htacess at all.

Whether the leading slash is present seems to make a huge difference, and causes the loop on Windows if missing.

Bottom line: it still does not work on Windows. A workaround would be to just dump the Windows environment. However, I have been trying to that for several years, and just cannot get a development environment I like native to the Mac, although PHPStorm seems to come the closest.

Here are the rules now in effect on Windows (same elsewhere, except when not on Windows, I have removed leading slashes from patterns):


RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /register\.php\?mode=create&usertype=pri\ HTTP/

RewriteRule ^/register\.php$ http://192.168.1.106:8080/manufacturers-sales-reps-register? [R=301,L]

RewriteRule ^/manufacturers-sales-reps-register /register.php?mode=create&usertype=pri [L]


Thread source:: http://www.webmasterworld.com/apache/4537982.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com