I have no idea about htaccess RewriteRule. I'm expecting someone here can help me with this. I need to send users from the firstline -to- secondline. Please help me with these three: // directory is alpha numeric images/newfolder/index.html -to- images/index.php?directory=./newfolder/ Code (markup): // pagenumber is numeric only images/1/index.html -to- images/index.php?pagenumber=1 Code (markup): images/sample-file-name/index.html?number=0&directory=./newfolder/ -to- images/index.php?directory=./newfolder/&number=0&filename=Sample File Name.jpg Code (markup):
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^images/([^.]+)/index\.html$ images/index.php?pagenumber=$1 [L] RewriteRule ^directory/([^.]+)/index\.html$ images/index.php?directory=./$1/ [L] Something has to be unique in each of them. aka...images for one of them. For something like images/sample-file-name/index.html?number=0&directory=./newfolder/ mod_rewrite is worthless cause it's still not very search engine friendly, after the index.html. er, you should get rid of the index.html part.
Thanks a lot. I'm gonna try this now. BTW, is it better to use index.php instead of index.html or it's better to remove index.html? EDIT: I get a blank screen. However, when I use full url for the latter part, it does work but the url in address bar changes to index.php?.... Can you help me again plz?
I would just get rid of the index.html Is domain.com/images/#/index.html the full URL you tried? And mod_rewrite doesn't change the links, the script has to be edited to do that.
nintendo, is there a variable that can be used in the .htaccess file to refer to the directory that the .htaccess file is residing in? thanks for your time.
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase /directory/ RewriteRule ^$ wacko.php [L] is for for example making /directory/wacko.php and /directory/ the same.