php - Rewrite url to show content from other url -
when http://www.placewomen.com/500/400/
called possible show contents of http://www.placewomen.com/c/500/400/
, makes c gone?
a bit tricky because there check empty sub , physically new url-rewrite doens't exist...
right htaccess;
options +followsymlinks -multiviews -indexes rewriteengine on rewritecond %{http_host} ^placewomen.com [nc] rewriterule ^(.*)$ http://www.placewomen.com/$1 [r=301,l] rewritecond %{the_request} \s/+new/index\.php\?var=([^\s&]+) [nc] rewriterule ^ /%1? [r=301,l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.+)$ /new/index.php?var=$1 [qsa,l] rewritecond %{request_filename} -d rewritecond %{request_filename}/placeholder.jpg -f rewriterule ^(.*)$ /$1/placeholder.jpg [l]
i'm frontender myself perhaps you'll understand behind knowledge...
try adding this:
rewritecond %{document_root}/c/$1 -f [or] rewritecond %{document_root}/c/$1 -d [or] rewritecond %{document_root}/c/$1 -l rewriterule ^(.*)$ /c/$1 [l]
in middle of htaccess file:
options +followsymlinks -multiviews -indexes rewriteengine on rewritecond %{http_host} ^placewomen.com [nc] rewriterule ^(.*)$ http://www.placewomen.com/$1 [r=301,l] rewritecond %{the_request} \s/+new/index\.php\?var=([^\s&]+) [nc] rewriterule ^ /%1? [r=301,l] rewritecond %{document_root}/c/$1 -f [or] rewritecond %{document_root}/c/$1 -d [or] rewritecond %{document_root}/c/$1 -l rewriterule ^(.*)$ /c/$1 [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.+)$ /new/index.php?var=$1 [qsa,l] rewritecond %{request_filename} -d rewritecond %{request_filename}/placeholder.jpg -f rewriterule ^(.*)$ /$1/placeholder.jpg [l]
Comments
Post a Comment