I have a page in which I want to display dynamic content.
Currently it works like:
site.com/c-page.php?brand=hp
How can I call it like:
site.com/brand/hp
Is it necessary to write a rule on htaccess?
Thanks.
If you're using Wordpress, You may select the Post name structure for the following structure. This will automatically change in your .htaccess file
Hope this will helps you.
For more information,
change WordPress permalink structure
Related
My current blog is www.bostonsbettah.com and my current permalink set-up is http://www.bostonsbettah.com/%category%/%postname%/
Now, in a perfect world, the a post should appear as something like www.bostonsbettah.com/bostonbruins/boston-bruins-1st-line-playing-like-a-1st-line/ and that should take you to the post. When I click on the page title at the top such as "Bruins Blog", it should take me to www.bostonsbettah.com/bostonbruins/ that has an archive of all posts categorized as "Bruins". Currently, however, every page besides the home page is a 404 error.
Now I know I can fix something in the .htaccess file and I know how to access it, but I don't want to mess with it as I don't know how to code. Is there a fix someone can provide that will allow me to fix my website? Thank you in advance.
Never,ever,ever put your blog URL inside custom permalink structure!. You must use one of the structure tags, or a combination of tags only.
Read the documentation first.
I am new to wordpress so trying to figure out something which I cannot and asking you guys. Please help if you know.
I have issues with URL formation in Wordpress. I want to show articles' category name in URL, so I am using Permlinks -> custom structure which is like /%category%/%postname%.htm I then pasted code given by WP in .htaccess file. So now articles use http://mysite/category1/article1.htm URL.
But then on index.php any links inside article shows URL ashttp://mysite/article2.htm and hence 404. I am using >Article2 inside a post. If I open http://mysite/category1/article1.htm then above link will show as http://mysite/category2/article2.htm which is the correct URL.
Can someone plese help me figure out correct way? Using above configuration, it works fine for all links when open individual posts but only main index.php does not include category name. Just to note, URLs in Recent Posts also show correct URL.
If the links are hardcoded inside the article itself, there's nothing inside WordPress PHP or settings to change. You just need to edit the post content and update the HTML link URLs using the new permalink structure, within Posts and/or Pages tab.
You can also try a plugin like Redirection which will redirect old post permalinks to the new (correct) permalink format.
http://wordpress.org/plugins/redirection/
I'm having some trouble trying to figure out how to make a custom URL in the admin area for my plugin. I already know how to use the add_menu function, but I need to create a sub-page for the plugin which wont be listed in a menu. I can't figure out how to define a URL for this page though.
Basically I just need it to do if they view "admin.php?page=my_page" then use the function I have made which simply does an include on the .php file for the page.
you can just use the ?page=my_page
if you want to add more to the url then use
?page=my_page&page-id
you will directory able to access this in admin area no need to use extra like bloginfo something for whole url
hope this will help you
Long short of it is this: if you go to mysite.com/blog, you see the blog landing page, which uses the index.php template in my theme. However, I want to be able to go to mysite.com/blog-content and get all the same content, but using my page-blog-content.php template in my theme.
How can this be done?
Thanks in advance!
* EDIT *
To clarify, I'm trying to have two different URLs, /blog and /blog-content load the same content; specifically, the blog landing page. The only difference between those two URLs should be the template they use. I have two templates in my theme ready to go, I just need to make /blog-content mirror /blog and direct it to use my page-blog-content.php template.
There's heaps of options available, but (I think?) your question is too broad to answer specifically.
In general, you can select a specific template for a given page/post (from within the page/post edit screen).
Otherwise, you can create a specific template that is selected, based on its filename, for a certain slug, category, etc...
Refer here: Wordpress Codex -> Template Hierarchy
Hope this helps!
You could use the theme switching feature/plugins of wordpress. It works with URL's
In my wordpress site url came the following format.
http://localhost/wordpress/?page_id=23
But i want it will come
http://localhost/wordpress.contact.php
this format.
please help me
Under Settings->Permalinks you can edit the structure of your URLs, but you won't be able to have just a dot between wordpress and the page name without using some .htaccess tricks. To have something like /post-name.php/ you would need:
/%postname%.php/
In the custom structure box on the settings page.