RewriteEngine on
RewriteCond %{REQUEST_FILENAME} \.(css|js)$
RewriteRule ^blog_show/(.*)$ blog_show.php/?t=$1 [NC,L]
the rewriting condition is for excluding css/js files from rewriting and it works.
The problem is the RewriteRule…it seems that is not happening at all…I have a 404 message from the server.
For example clicking this link:/blog_show/2016-07-25/an–offer, I get the requested URL was not found on the server…no rewriting takes place.
The directory blog_show should be different than the file blog_show.php. Which is it you’re linking to? OR are you using the horrid Options MultiViews (you must be to have blog_show.php in the path to {DirectoryIndex} with a query string). Argh!
Where is your .htaccess located, Frontend?
“t=2016-07-28/”? Again, why the trailing /?
That looks like something from M$. While M$ tries to copy Apache’s mod_rewrite, they serve it in too many flavors to make any sense of what they’re doing at all.
Second post:
Your RewriteCond specifies the requirement to HAVE either .css or .js as the file extension. It simply cannot exclude those file types without the ! (negative/not) modifier before the backslash.
Same comments as above about MultiViews and trailing slashes.
[rant #1][indent]The use of “lazy regex,” specifically the EVERYTHING atom, (.*), and its close relatives, is the NUMBER ONE coding error of newbies BECAUSE it is “greedy.” Unless you provide an “exit” from your redirection, you will ALWAYS end up in a loop![/indent][/rant #1]
I should also create a rant for using the No Case flag on case SENSITIVE variables, i.e., RewriteRule which can only try to match the case SENSITIVE {REQUEST_URI}.
Yes, you used both because some tutorials showed them without explaining the adverse affects they have. My advise is to learn what code does before using it.
You might benefit from reading the mod_rewrite tutorial (http://dk.co.nz/seo) as it contains explanations and sample code. It’s helped may members and should help you, too.