htaccess Photoplog rewrite url - vbulletin

I am using vbulletin and installed photoplog and this is my url:
https://www.mknexusonline.com/gallery/
and this is my category url
https://www.mknexusonline.com/gallery/index.php?n=1025
Rewrite url i want
https://www.mknexusonline.com/gallery/category
and this is my image url
https://www.mknexusonline.com/gallery/images/5/1_mk11-_scorpion-win.jpg
rewrite url like this https://www.mknexusonline.com/gallery/categoryname/mk-scorpion-win.jpg
now the questions i want to rewrite my image url like this
the number 1027 is bu default after install photoplog
and this is already rewrite url see demo link
https://www.pentaxforums.com/gallery/ (its not my website)
https://www.pentaxforums.com/gallery/travel/ (this category rewrite i want like this )
and this image rewrite url
https://www.pentaxforums.com/gallery/photo-mexican-alebrijes-56660/ (i want like this )

Related

How to use the keyword "location" in the URL parameter in AWS Amplify

I am currently working on a 1 page HTML app that uses URL parameters to do an API call. the URL parameters are set and used in QR codes so its necessary that they are able to change dynamically. A example URL would be something like app.com/index.html/?environment=demo&location=Kiosk
I currently have this app deployed in AWS Amplify, but I cant get other keywords to chain together. I have the following redirects in place:
These redirects make sure that every URL parameter I pass in the link works EXCEPT some keywords like the "location" keyword, next to some others. Using this keyword as a URL param gives a 502 server error, or if the redirects are not used an access denied error.
does anyone know how to get the location keyword to work? Thanks in advance!
You should be able to use a single rule that will forward everything to index.html EXCEPT urls with a "file extension" from the list below. That lets all your links work, but assets like images, fonts, code will pass through.
Doc for: Using Redirects - Single Page Apps
</^[^.]+$|\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|woff2|ttf|map|json)$)([^.]+$)/>

how to use uncompleted url in plugin InAppWebView for browsing in flutter

if I input link: youtube.com, URLRequest(url: Uri.parse(url)) will not response this url, so I have to input https://www.youtube.com/, but normal user will not input so complicated url link, so is that a way to let InAppWebView confirm this uncompleted url?
A work around:
In the Input field use a prefix text as "https://" and get the URL from the user. In this way the user would know to not type the HTTP part again. ( like the dollar symbol in the below image)
Edit this line to: URLRequest("https://"+url: Uri.parse("https://"+url))
How to add prefix text to input field? ANSWER

Laravel 5.5 redirect 301 from old to new url

Reason: My website is indexed with old urls so I want to redirect until google re-crawls it. Once new urls are indexed I want to remove old url completely.
Old url structure:
I have changed a url and replaced underscores with dashes from
Route::get('{var1}_{var2}_details','');
to new
New url structure
Route::get('{var1}-{var2}-details','')->name('datails');
I want: to remove old url from my website completely and show only new url. How can I achieve that ?
Right now, I'am using redirect() on my old url;
Route::get('{var1}_{var2}_details', function($var1, $var2){
return redirect()->route('details',[$var1, $var2]); });
}
When I hit php artisan route:list it show both routes. How can I remove old url ?
My website is indexed with old urls so I want to redirect until google re-crawls it. Once new urls are indexed I want to remove old url completely

Redirect with URL fragment with Play framework 2

How can I add an URL fragment (#xyz) to a link created by the Redirect method?
I want something like this:
Redirect(routes.Comment.get(itemId) + "#xyz")
You can get the url form the route using .url (which contains a relative url). Redirect needs two parameters to accept a string to redirect to
so, Redirect(routes.Comment.get(itemId).url + "#xyz", SEE_OTHER) should work
Edited when I realized Redirect() takes a Call and not a string
With Play Framework 2.4 is possible do this:
Redirect(routes.Comment.get(itemId).withFragment("#xyz").toString)

url rewrite & redirect question

Say currently I have url like :
http://mydomain.com/showpost.php?p=123
Now I want to make it prettier :
http://mydomain.com/123/post-title
I'm using apache rewrite which grabs segment '123' and put the url back to
http://mydomain.com/showpost.php?p=123
OK. Here is the problem. I want to redirect the original non-pretty urls which were indexed by Google to the pretty versions, I want this because I heard that Google may punish me if he sees multiple urls pointing to identical content. So I need to
redirect /showpost.php?p=123 to /123/post-title
This I have to do in my php code coz there's no way Apache to be able to figure out the 'post-title', but if I put the redirect code in php code, then it will be a infinite loop, such as :
Request : /showpost.php?p=123
redirected to : /123/post-title
rewritten to: /showpost.php?p=123
redirected again to : /123/post-title
...
So on and so forth.
Sorry I should Google the solution first but I really don't know how to describe my situation in English to make Google return reasonable results.
Please help me. Thanks.
You can set a request variable in your rewrite rule, by adding something like [E=rewritten:true] at the end of the RewriteRule line, to record the fact that the rewrite was done. In your PHP, you should be able to access this as $_SERVER['rewritten'], and do the redirect only if the flag is absent.
Alternately, you can use a rewrite rule to redirect the non-pretty URL to the pretty one without the post title, then use application code to issue another redirect with the post title added. Using two redirects is less desirable, of course, but it's only a temporary measure until search engines update their indexes, then you can remove it.
Make sure you use 301 Moved Permanently for your redirect, btw.