antonyfal Posted June 10, 2012 Share Posted June 10, 2012 Hi, im just figuring out the mod rewrite and htaccess files, im getting a good handle on it, but i have the strange issue: firstly i cant use the Options +FollowSymlinks im guessing its because the server has it enabled by default.. secondly i can type the sef url in the browser and it shows the correct page/s.. but if i click the link (original) on the site or type the originalurl in the address bar, the SEF url doesnt show.. is there a method for redirecting to sef url that i am missing? this is what i got so far: RewriteEngine on #RewriteBase /folder1/folder2/ #RewriteCond %{SERVER_PORT} !^443$ #RewriteRule ^(.*)$ https://www.xxxxxx.com/$1 [R=permanent] RewriteRule ^logout.html$ index.php?a=k&jsat=log_out RewriteRule ^login.html$ index.php?a=k&jsat=login_form RewriteRule ^profile.html$ index.php?a=k RewriteRule ^preview.html$ index.php?a=k&task=preview #RewriteCond %{THE_REQUEST} ^GET\ /folder2/ #RewriteRule ^newfolder2/(.*) /folder2/$1 [L,R=301] Quote Link to comment Share on other sites More sharing options...
gizmola Posted June 10, 2012 Share Posted June 10, 2012 I'm not entirely sure I understand your problem. Clear cut examples would help. Generally speaking however, "Redirects" and "rewrites" are 2 different things. From your list, you have no active redirection rules -- only rewrites. The 4 rewrites you have are pretty clear cut: RewriteRule ^logout.html$ index.php?a=k&jsat=log_out RewriteRule ^login.html$ index.php?a=k&jsat=login_form RewriteRule ^profile.html$ index.php?a=k RewriteRule ^preview.html$ index.php?a=k&task=preview Could you provide a specific example of what is not working in regards to these rules? Quote Link to comment Share on other sites More sharing options...
antonyfal Posted June 10, 2012 Author Share Posted June 10, 2012 Hi thanks for the reply.. After reading what you wrote-- i think what im needing/wanting is to redirect the original url to the sef url-- for example: RewriteRule ^preview.html$ index.php?a=k&task=preview if i type: www.xxx.com/folder1/folder2/preview.html in the adressbar it works and takes me to the www.xxx.com/folder1/folder2/index.php?a=k&task=preview page.. but how do i get it to do the reverse: what i want to do is always have the SEF url diaplyed in the address bar: so if i type/or click the link: www.xxx.com/folder1/folder2/index.php?a=k&task=preview it must show the www.xxx.com/folder1/folder2/preview.html the sef url in the address bar and go to the www.xxx.com/folder1/folder2/index.php?a=k&task=preview page.. whats happening now is: if i type the www.xxx.com/folder1/folder2/index.php?a=k&task=preview the url remains so, and the page loads i just want it to change to the SEF url first Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.